Bug 1444: Fix \r\n handling writing spool file
authorTodd Lyons <tlyons@exim.org>
Wed, 28 May 2014 15:48:45 +0000 (08:48 -0700)
committerTodd Lyons <tlyons@exim.org>
Wed, 28 May 2014 15:48:45 +0000 (08:48 -0700)
Fix a bug which causes DKIM signatures to fail because what gets
  written to the spool file is different than what gets passed through
  the DKIM code.

doc/doc-txt/ChangeLog
src/src/receive.c

index ee56623ad6c99a18475f9833a41692fec7f4e648..a1ef01912fbdbaf4f99b65562252c44dfd2c9a52 100644 (file)
@@ -123,6 +123,9 @@ TL/11 Bug 1119: fix memory allocation in string_printing2().  Patch from
 
 JH/24 The OCSP stapling feature is moved from Experimental into the mainline.
 
 
 JH/24 The OCSP stapling feature is moved from Experimental into the mainline.
 
+TL/12 Bug 1444: Fix improper \r\n sequence handling when writing spool
+      file.  Patch from Wolfgang Breyha.
+
 
 Exim version 4.82
 -----------------
 
 Exim version 4.82
 -----------------
index ea957c7cf7d79fe80621c90721436bf576e7e10c..ac3f0cf07545254cd70a52903c52272e88c68cfa 100644 (file)
@@ -684,6 +684,7 @@ while ((ch = (receive_getc)()) != EOF)
 
     case 1:                         /* After written "\n" */
     if (ch == '.') { ch_state = 3; continue; }
 
     case 1:                         /* After written "\n" */
     if (ch == '.') { ch_state = 3; continue; }
+    if (ch == '\r') { ch_state = 2; continue; }
     if (ch != '\n') ch_state = 0; else linelength = -1;
     break;
 
     if (ch != '\n') ch_state = 0; else linelength = -1;
     break;