Skip to content

Commit

Permalink
mailinfo: feed the correct line length to decode_transfer_encoding()
Browse files Browse the repository at this point in the history
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 <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Jul 7, 2008
1 parent 77cb7bc commit 6fc2a25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions builtin-mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ static void handle_body(void)
np - newline);
if (!handle_boundary())
return;
len = strlen(line);
}

/* Unwrap transfer encoding */
Expand Down

0 comments on commit 6fc2a25

Please sign in to comment.