DKIM: fix crash with a verification when dkim disabled, under CHUNKING
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 12 Feb 2017 21:46:30 +0000 (16:46 -0500)
committerPhil Pennock <pdp@exim.org>
Sun, 12 Feb 2017 21:48:23 +0000 (16:48 -0500)
(cherry picked from commit 79de4f370f306869887e1714ff4ecef5bfc93fa5)
(changelog added)
Signed-off-by: Phil Pennock <pdp@exim.org>
doc/doc-txt/ChangeLog
src/src/smtp_in.c

index 3c90d6480aeff09fd37905234e2d4c85adbb96e1..0af5504e35a9fd8a0f6868b440f4fbf8673e0c1d 100644 (file)
@@ -97,6 +97,8 @@ PP/08 Reduce a number of compilation warnings under clang; building with
       CC=clang CFLAGS+=-Wno-dangling-else -Wno-logical-op-parentheses
       should be warning-free.
 
+JH/17 Fix inbound CHUNKING when DKIM disabled at runtime.
+
 
 Exim version 4.88
 -----------------
index bd83de0456b0322662a9a51f1be93295d6b7a8c6..5461104b2f78f6b6f696968a1cd9866539ac8e6d 100644 (file)
@@ -486,12 +486,17 @@ uschar * log_msg;
 
 for(;;)
   {
+#ifndef DISABLE_DKIM
+  BOOL dkim_save;
+#endif
+
   if (chunking_data_left > 0)
     return lwr_receive_getc(chunking_data_left--);
 
   receive_getc = lwr_receive_getc;
   receive_ungetc = lwr_receive_ungetc;
 #ifndef DISABLE_DKIM
+  dkim_save = dkim_collect_input;
   dkim_collect_input = FALSE;
 #endif
 
@@ -592,7 +597,7 @@ next_cmd:
       receive_getc = bdat_getc;
       receive_ungetc = bdat_ungetc;
 #ifndef DISABLE_DKIM
-      dkim_collect_input = TRUE;
+      dkim_collect_input = dkim_save;
 #endif
       break;   /* to top of main loop */
       }