The MT_SMTPREPLY case in mt_eom_check prints two possibly-NULL char
pointers via format string %s. This triggers undefined behaviour. On my
machine, these pointers are printed as the string ‘(null)’. In any case
this distorts the test result.
The attached patch fixes this by making sure the two char pointers ‘esc’
and ‘text’ are only passed to snprintf when they are not NULL.
The MT_SMTPREPLY case in mt_eom_check prints two possibly-NULL char pointers via format string %s. This triggers undefined behaviour. On my machine, these pointers are printed as the string ‘(null)’. In any case this distorts the test result.
The attached patch fixes this by making sure the two char pointers ‘esc’ and ‘text’ are only passed to snprintf when they are not NULL.