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
Junio C Hamano <gitster@pobox.com>
Date
Jul 6, 2008, 22:13 UTC
Message-ID
<7vfxqmd5kv.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1215379261-10802-1-git-send-email-dzickus@redhat.com>
Don Zickus <dzickus@redhat.com> writes:
Show 10 quoted lines
> Boundary lines in emails are treated as a special case.  As a result of
> processing the boundary line a new line will be read into the buffer.
>
> The string length variable 'len' is evaluated before the boundary case, thus
> there is the possibility the length of the string does not match the new
> line read in (in the boundary line case).  This causes a partial output of
> the line to the patch file.
>
> The fix is trivial, evaluate the length of the string right before
> processing it.

Ah, I was about to bisect this to see where it needs to be fixed and if it needs to be fixed in maint (or maint-1.5.5 and earlier). Thanks for doing this before I got around to it.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 4 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.