@matheusbsbs / matheus-bagliano / commits / 2662dbfa58
Fork 0

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>

Eric W. Biederman committed Jun 12, 2006 at 13:48 UTC 2662dbfa58a2d12d1ab3d240b643b9506f43523b
1 file changed +2
mailinfo.c
+2
@@ -246,6 +246,8 @@ static int eatspace(char *line)
246 /* First lines of body can have From:, Date:, and Subject: */
247 static void handle_inbody_header(int *seen, char *line)
248 {
249 + if (*seen & SEEN_PREFIX)
250 + return;
251 if (!memcmp(">From", line, 5) && isspace(line[5])) {
252 if (!(*seen & SEEN_BOGUS_UNIX_FROM)) {
253 *seen |= SEEN_BOGUS_UNIX_FROM;