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

Re: [PATCH] Allow emails with boundaries to work again

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 14, 2008, 01:36 UTC
Message-ID
<7vtzdogyx6.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1218667559-26618-1-git-send-email-dzickus@redhat.com>
Don Zickus <dzickus@redhat.com> writes:
Show 7 quoted lines
> Recent changes to is_multipart_boundary() caused git-mailinfo to segfault.
> The reason was after handling the end of the boundary the code tried to look
> for another boundary.  Because the boundary list was empty, dereferencing
> the pointer to the top of the boundary caused the program to go boom.
>
> The fix is to check to see if the list is empty and if so go on its merry
> way instead of looking for another boundary.

Hmm, at this point !*content_top means that we are at the outermost level and we have just seen --boundary-- which is the terminating one, haven't we? Shouldn't we be simply returning?

Previous: Don ZickusNext: Don Zickus
Message 4 of 5 in “Allow emails with boundaries to work again”
  1. Allow emails with boundaries to work againDon Zickus, Aug 13, 2008
  2. Junio C HamanoAug 13, 2008
  3. Don ZickusAug 14, 2008
  4. Junio C HamanoAug 14, 2008
  5. Don ZickusAug 14, 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.