summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2006-06-12 19:48:35 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-06-17 23:27:12 (GMT)
commit2662dbfa58a2d12d1ab3d240b643b9506f43523b (patch)
tree7a0ce852ccdc505750b9047308913eee317ec872
parent4839c0b5fa14a09c5559317afe5d16e5c81dd176 (diff)
downloadgit-2662dbfa58a2d12d1ab3d240b643b9506f43523b.zip
git-2662dbfa58a2d12d1ab3d240b643b9506f43523b.tar.gz
git-2662dbfa58a2d12d1ab3d240b643b9506f43523b.tar.bz2
Don't parse any headers in the real body of an email message.
It was pointed out that the current behaviour might mispart a patch comment so remove this behaviour for now. [jc: this fixes "From: line in the middle" check in t5100 test.] Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--mailinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mailinfo.c b/mailinfo.c
index 5b6c215..0ccd490 100644
--- a/mailinfo.c
+++ b/mailinfo.c
@@ -246,6 +246,8 @@ static int eatspace(char *line)
/* First lines of body can have From:, Date:, and Subject: */
static void handle_inbody_header(int *seen, char *line)
{
+ if (*seen & SEEN_PREFIX)
+ return;
if (!memcmp(">From", line, 5) && isspace(line[5])) {
if (!(*seen & SEEN_BOGUS_UNIX_FROM)) {
*seen |= SEEN_BOGUS_UNIX_FROM;