]> diplodocus.org Git - nmh/commitdiff
mhlsbr.c: Don't strchr(3) non-string NUL-less buffer.
authorRalph Corderoy <ralph@inputplus.co.uk>
Sun, 17 Sep 2017 12:19:40 +0000 (13:19 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Sun, 17 Sep 2017 12:47:56 +0000 (13:47 +0100)
Up to 8 KiB was read into a buffer and then strchr() used to test for a
linefeed.  There was no guarantee the linefeed would be present, else
why test for it, nor that the buffer would contain a NUL to terminate
the search, either from the read bytes, or the bytes not trampled by
read().  Replace the two similar lumps of code with a new
linefeed_typed().  Bug pre-dates git.


No differences found