Skip to content

Commit

Permalink
Don't parse any headers in the real body of an email message.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
ebiederm authored and Junio C Hamano committed Jun 17, 2006
1 parent 4839c0b commit 2662dbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mailinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2662dbf

Please sign in to comment.