summaryrefslogtreecommitdiff
path: root/t/t5100
diff options
context:
space:
mode:
authorDon Zickus <dzickus@redhat.com>2008-08-14 15:35:42 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-08-19 05:05:02 (GMT)
commit289796dd29dd656734cfd59b657deb943a71cf6a (patch)
tree7ff6e57895095b4ef499bd18c8d665e43a457103 /t/t5100
parentdba9194a49452b5f093b96872e19c91b50e526aa (diff)
downloadgit-289796dd29dd656734cfd59b657deb943a71cf6a.zip
git-289796dd29dd656734cfd59b657deb943a71cf6a.tar.gz
git-289796dd29dd656734cfd59b657deb943a71cf6a.tar.bz2
mailinfo: re-fix MIME multipart boundary parsing
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: Don Zickus <dzickus@redhat.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5100')
-rw-r--r--t/t5100/sample.mbox1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/t5100/sample.mbox b/t/t5100/sample.mbox
index d7ca79b..4bf7947 100644
--- a/t/t5100/sample.mbox
+++ b/t/t5100/sample.mbox
@@ -500,3 +500,4 @@ index 3e5fe51..aabfe5c 100644
1.6.0.rc2
--=-=-=--
+