From: Don Zickus Date: Mon, 07 Jul 2008 13:39:45 GMT Subject: Re: [PATCH] git-mailinfo may corrupt patch headers on attached files Message-ID: <20080707133945.GB23190@redhat.com> In-Reply-To: <7v1w269sp9.fsf@gitster.siamese.dyndns.org> On Sun, Jul 06, 2008 at 10:19:46PM -0700, Junio C Hamano wrote: > The point you inserted strlen() above, however, is one of the places that > line[] has patch text and can have NUL in it, so strlen() there would > break the earlier fix. > > Here is the minimum replacement patch, still not handling embedded NULs > anywhere in the structural part of the message, that should work. Sane > MUAs should quote embedded NULs in the original contents with QP or BASE64 > to protect them from handle_boundary() and other functions, and after > decoding, these embedded NULs will be kept by decode_transfer_encoding(), > so I think this would work Ok in practice. > > I tested this with both Linus's test message and it does not break t5100. Good thing for test cases. :-) Thanks for the explanation. ACK Cheers, Don