From: Junio C Hamano Date: Mon, 7 Jul 2008 05:26:45 +0000 (-0700) Subject: mailinfo: feed the correct line length to decode_transfer_encoding() X-Git-Tag: v1.6.0-rc0~125^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6fc2a25e6215f1b1916a3da93bf7ddace8ba5310?ds=inline;hp=--cc mailinfo: feed the correct line length to decode_transfer_encoding() When handling a MIME multipart message, multi-part boundary lines are eaten by a call to handle_boundary() function from the main loop of handle_body(), and after that happens, we should update the line length correctly, because handle_boundary() udpates line[] with new data. This was caused by a thinko in 9aa2309 (mailinfo: apply the same fix not to lose NULs in BASE64 and QP codepaths, 2008-05-25). Signed-off-by: Junio C Hamano --- 6fc2a25e6215f1b1916a3da93bf7ddace8ba5310 diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c index 97c1ff9744..fa6e8f90a4 100644 --- a/builtin-mailinfo.c +++ b/builtin-mailinfo.c @@ -812,6 +812,7 @@ static void handle_body(void) np - newline); if (!handle_boundary()) return; + len = strlen(line); } /* Unwrap transfer encoding */