You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Commit f50f3bd added an extra parameter to function g_mime_parser_options_set_warning_callback() which requires all applications using this function to be modified and re-compiled, which is quite unexpected for a minor version update. Just updating the shared library from ver. 3.2.13 to 3.2.14 or later, i.e. calling the function with the wrong number of arguments, according to ISO/IEC 9899:2011, section 6.5.2.2 Function calls, clause 6
[…] If the number of arguments does not equal the number of parameters, the behavior is undefined.
may result in strange effects, including crashes (it appears that gcc implicitly sets the missing parameter to NULL, but this is an extension of the aforementioned standard). See also e.g. SEI CERT C Coding Standard, EXP37-C or MISRA C:2012 Rule 8.2.
Suggestion:
add a new function g_mime_parser_options_set_warning_callback_full() with 4 parameters, and
revert the change of g_mime_parser_options_set_warning_callback(), making it a wrapper to the former with an extra 4th NULL parameter.
The text was updated successfully, but these errors were encountered:
Commit f50f3bd added an extra parameter to function
g_mime_parser_options_set_warning_callback()
which requires all applications using this function to be modified and re-compiled, which is quite unexpected for a minor version update. Just updating the shared library from ver. 3.2.13 to 3.2.14 or later, i.e. calling the function with the wrong number of arguments, according to ISO/IEC 9899:2011, section 6.5.2.2 Function calls, clause 6may result in strange effects, including crashes (it appears that
gcc
implicitly sets the missing parameter toNULL
, but this is an extension of the aforementioned standard). See also e.g. SEI CERT C Coding Standard, EXP37-C or MISRA C:2012 Rule 8.2.Suggestion:
g_mime_parser_options_set_warning_callback_full()
with 4 parameters, andg_mime_parser_options_set_warning_callback()
, making it a wrapper to the former with an extra 4thNULL
parameter.The text was updated successfully, but these errors were encountered: