diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2017-10-21 19:27:01 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2017-10-21 19:27:01 +0100 |
commit | e99a3a6cbb83db9934b97ddac837ab37cb9e4719 (patch) | |
tree | 0950b90d63ef27533f7524faee0d432424572f13 | |
parent | d097cc730a1ab358bad80338b30b49287d1274c3 (diff) |
CHUNKING: Fix flush of chunk on error
-rw-r--r-- | doc/doc-txt/ChangeLog | 4 | ||||
-rw-r--r-- | src/src/smtp_in.c | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 9404b7a57..4b3d64e0c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -178,6 +178,10 @@ JH/30 Fix a logging bug on aarch64: an unsafe routine was previously used for connection in response to HELO" was logged instead of the actual 4xx error for the HELO. +JH/31 Fix CHUNKING code to properly flush the unwanted chunk after an error. + Previously only that bufferd was discarded, resulting in SYMTP command + desynchronisation. + Exim version 4.89 ----------------- diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b27949e35..1fdb705a5 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -681,8 +681,11 @@ return buf; void bdat_flush_data(void) { -unsigned n = chunking_data_left; -(void) bdat_getbuf(&n); +while (chunking_data_left) +{ + unsigned n = chunking_data_left; + (void) bdat_getbuf(&n); +} receive_getc = lwr_receive_getc; receive_getbuf = lwr_receive_getbuf; |