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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:09

Don Zickus [off-list ref] writes:
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?

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

From: Don Zickus <hidden>
Date: 2016-06-15 22:45:09

On Wed, Aug 13, 2008 at 06:36:53PM -0700, Junio C Hamano wrote:
Don Zickus [off-list ref] writes:
quoted
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?
That's what I originally did, but then I realized the rest of the
handle_boundary() reads the next line of text, which is needed to continue
processing in handle_body().  :-)

Cheers,
Don
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help