git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-mailinfo may corrupt patch headers on attached files

From
DZDon Zickus <dzickus@redhat.com>
Date
Jul 7, 2008, 13:39 UTC
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:
Show 12 quoted lines
> 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

Previous: Junio C Hamano
Message 7 of 7 in “'git am' breakage with MIME decoding”
  1. Linus TorvaldsJul 6, 2008
  2. git-mailinfo may corrupt patch headers on attached filesDon Zickus, Jul 6, 2008
  3. Linus TorvaldsJul 6, 2008
  4. Junio C HamanoJul 6, 2008
  5. Junio C HamanoJul 7, 2008
  6. Junio C HamanoJul 7, 2008
  7. Don ZickusJul 7, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.