]> diplodocus.org Git - nmh/commit
content_error(): Don't strlen(invo_name) that might be NULL.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 8 Sep 2017 12:48:29 +0000 (13:48 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 8 Sep 2017 12:48:29 +0000 (13:48 +0100)
commitbf0fa4275147d53be15621d12d6b71916f164385
treebeaf67f915fbb51adb9fc446c791f6d627d92c78
parentcbed730103da38443ab371936107c85bcce8e8e2
content_error(): Don't strlen(invo_name) that might be NULL.

Earlier in content_error(), it checks invo_name isn't NULL before using
it.  Later, it passes it to strlen(3) without the check.  Either the
former is redundant or the latter wrong.  Rather than work out which,
delete the strlen(invo_name) because it was only used for a
variable-width indent on a second diagnostic line.  Instead, indent by a
fixed four spaces, which will look better when invo_name is stupidly
long anyway.  Bug present since pre-git.
test/mhlist/test-mhlist
test/mhstore/test-mhstore
uip/mhmisc.c