]> granicus.if.org Git - neomutt/commit
Fix oob reads when fgets returns "\0". (closes #3776)
authorKevin McCarthy <kevin@8t8.us>
Wed, 30 Sep 2015 03:21:06 +0000 (11:21 +0800)
committerKevin McCarthy <kevin@8t8.us>
Wed, 30 Sep 2015 03:21:06 +0000 (11:21 +0800)
commit8df7dfd37155a14361efd82f293825a89fb7dda9
treeb56c8070e8a21b29464084b2938b8797d80db592
parent51eda38249eb525f9e508e1516d322513062ea72
Fix oob reads when fgets returns "\0".  (closes #3776)

The ticket reported an out of bounds read in mutt_read_rfc822_line()
when a '\0' was embedded on its own line in the headers.  The function
assumed if fgets() didn't return NULL, then the string would have at
least one character.

I scanned the rest of the code and found three other places making the
same assumption for fgets.

Thanks to hanno for finding this with the "american fuzzy lop" tool.
parse.c
smime.c
smtp.c