summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-12-13 12:50:40 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2017-12-13 14:16:14 +0000
commitfc6d65867e82009a6e0671771728d41d3423a790 (patch)
tree8fbbc33438bfc452355f3cae3085634f6ce6165a
parent6e5f1c267dfd43b73d69cf766650caa6bced91ed (diff)
downloadexim4-exim-4_89+fixes.tar.gz
CHUNKING: flush input stream after message-fatal error detection. Bug 2201exim-4_89+fixes
Cherry-picked from: d21bf202db
-rw-r--r--doc/doc-txt/ChangeLog5
-rw-r--r--src/src/receive.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 2da95deb3..d62ac46d9 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -66,6 +66,11 @@ HS/03 Bug 2201: Fix checking for leading-dot on a line during headers reading
from SMTP input. Previously it was always done; now only done for DATA
and not BDAT commands. CVE-2017-16944.
+JH/35 Bug 2201: Flush received data in BDAT mode after detecting an error fatal
+ to the message (such as an overlong header line). Previously this was
+ not done and we did not exit BDAT mode. Followon from the previous item
+ though a different problem.
+
Exim version 4.89
-----------------
diff --git a/src/src/receive.c b/src/src/receive.c
index 2812ea2c8..ad9b6a235 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1020,7 +1020,6 @@ for(;;)
-
/*************************************************
* Swallow SMTP message *
*************************************************/
@@ -1037,9 +1036,10 @@ Returns: nothing
void
receive_swallow_smtp(void)
{
-/*XXX CHUNKING: not enough. read chunks until RSET? */
if (message_ended >= END_NOTENDED)
- message_ended = read_message_data_smtp(NULL);
+ message_ended = chunking_state <= CHUNKING_OFFERED
+ ? read_message_data_smtp(NULL)
+ : read_message_bdat_smtp(NULL);
}