author | Junio C Hamano <junkio@cox.net> | |
Tue, 23 May 2006 21:57:00 +0000 (14:57 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 23 May 2006 21:57:00 +0000 (14:57 -0700) |
* eb/mailinfo:
Allow in body headers beyond the in body header prefix.
More accurately detect header lines in read_one_header_line
In handle_body only read a line if we don't already have one.
Refactor commit messge handling.
Move B and Q decoding into check header.
Make read_one_header_line return a flag not a length.
Allow in body headers beyond the in body header prefix.
More accurately detect header lines in read_one_header_line
In handle_body only read a line if we don't already have one.
Refactor commit messge handling.
Move B and Q decoding into check header.
Make read_one_header_line return a flag not a length.
1 | 2 | |||
---|---|---|---|---|
mailinfo.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc mailinfo.c
index a133e6d08aa69a5b19f6f232729b7dd108a630d6,241bfb9e25d54ab2620c456830ad622db9405023..78d2a15dd0ea79b5950772c3f35837f7b99a9ac8
--- 1/mailinfo.c
--- 2/mailinfo.c
+++ b/mailinfo.c
#define SEEN_FROM 01
#define SEEN_DATE 02
#define SEEN_SUBJECT 04
-#define SEEN_PREFIX 0x08
+#define SEEN_BOGUS_UNIX_FROM 010
++#define SEEN_PREFIX 020
/* First lines of body can have From:, Date:, and Subject: */
- static int handle_inbody_header(int *seen, char *line)
+ static void handle_inbody_header(int *seen, char *line)
{
- return 1;
+ if (!memcmp(">From", line, 5) && isspace(line[5])) {
+ if (!(*seen & SEEN_BOGUS_UNIX_FROM)) {
+ *seen |= SEEN_BOGUS_UNIX_FROM;
++ return;
+ }
+ }
if (!memcmp("From:", line, 5) && isspace(line[5])) {
if (!(*seen & SEEN_FROM) && handle_from(line+6)) {
*seen |= SEEN_FROM;