• D
    mailinfo: re-fix MIME multipart boundary parsing · 289796dd
    Don Zickus 提交于
    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.
    
    I also fixed a couple of increments and decrements that didn't look correct
    relating to content_top.
    
    The boundary test case was updated to catch future problems like this again.
    Signed-off-by: NDon Zickus <dzickus@redhat.com>
    Signed-off-by: NJunio C Hamano <gitster@pobox.com>
    289796dd
sample.mbox 15.0 KB