Chunking: do not treat the first lonely dot special. CVE-2017-16944, Bug 2201
[users/jgh/exim.git] / src / src / receive.c
index cbf85b065b6af104c359b69db8e8f7e6385106f5..ae2c93b4efd56419c588b4c868d5047c4d57f244 100644 (file)
@@ -1859,7 +1859,7 @@ for (;;)
   prevent further reading), and break out of the loop, having freed the
   empty header, and set next = NULL to indicate no data line. */
 
-  if (ptr == 0 && ch == '.' && (smtp_input || dot_ends))
+  if (ptr == 0 && ch == '.' && dot_ends)
     {
     ch = (receive_getc)(GETC_BUFFER_UNLIMITED);
     if (ch == '\r')
@@ -3794,7 +3794,7 @@ else
       break;
     }
 
-  g = string_append(g, 2, US"F=",
+  g = string_append(NULL, 2, US"F=",
     sender_address[0] == 0 ? US"<>" : sender_address);
   g = add_host_info_for_log(g);