diff options
author | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-06-29 09:20:37 +0000 |
---|---|---|
committer | Philip Hazel <ph10@hermes.cam.ac.uk> | 2007-06-29 09:20:37 +0000 |
commit | 1f5497b2a08c38975c9945122a0279bb03f99e28 (patch) | |
tree | 0e5a0c3de395a94111f87741d105cef86747be43 /src | |
parent | f53dbcfc62a395f3f3015a5b595ca538d537c2a5 (diff) |
Fix stupid oversight in $max_received_linelength.
Diffstat (limited to 'src')
-rw-r--r-- | src/src/receive.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/src/receive.c b/src/src/receive.c index ee95cc981..6d07e5c41 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/receive.c,v 1.38 2007/06/22 14:38:58 ph10 Exp $ */ +/* $Cambridge: exim/src/src/receive.c,v 1.39 2007/06/29 09:20:37 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -728,6 +728,7 @@ read_message_data_smtp(FILE *fout) { int ch_state = 0; register int ch; +register int linelength = 0; while ((ch = (RECEIVE_GETC)()) != EOF) { @@ -749,6 +750,9 @@ while ((ch = (RECEIVE_GETC)()) != EOF) { ch_state = 0; body_linecount++; + if (linelength > max_received_linelength) + max_received_linelength = linelength; + linelength = -1; } else if (ch == '\r') { @@ -759,6 +763,9 @@ while ((ch = (RECEIVE_GETC)()) != EOF) case 2: /* After (unwritten) CR */ body_linecount++; + if (linelength > max_received_linelength) + max_received_linelength = linelength; + linelength = -1; if (ch == '\n') { ch_state = 0; @@ -800,6 +807,7 @@ while ((ch = (RECEIVE_GETC)()) != EOF) next. */ message_size++; + linelength++; if (fout != NULL) { if (fputc(ch, fout) == EOF) return END_WERROR; |