From: Ralph Corderoy Date: Sun, 17 Sep 2017 12:19:40 +0000 (+0100) Subject: mhlsbr.c: Don't strchr(3) non-string NUL-less buffer. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/872ef4dde72a88ceb1358849a462f791135b842d?hp=872ef4dde72a88ceb1358849a462f791135b842d mhlsbr.c: Don't strchr(3) non-string NUL-less buffer. 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. ---