Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miltertest: Fix undefined behaviour in mt.eom_check() with MT_SMTPREPLY #58

Merged

Conversation

glts
Copy link

@glts glts commented Jan 2, 2020

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.

@martinbogo
Copy link

Works, does not cause build or functional issues when tested. Merging.

@martinbogo martinbogo merged commit e322a84 into trusteddomainproject:develop Oct 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants