From: Johannes Schindelin Date: Fri, 16 May 2008 13:03:30 +0000 (+0100) Subject: mailsplit and mailinfo: gracefully handle NUL characters X-Git-Tag: v1.5.6-rc0~2^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/cce8d6fdb4d7170a73763586daf6ac4f6b8fce2c?ds=inline;hp=cce8d6fdb4d7170a73763586daf6ac4f6b8fce2c mailsplit and mailinfo: gracefully handle NUL characters The function fgets() has a big problem with NUL characters: it reads them, but nobody will know if the NUL comes from the file stream, or was appended at the end of the line. So implement a custom read_line_with_nul() function. Noticed by Tommy Thorn. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---