diff src/dnsbl.cpp @ 356:90d433d1382e

when extracting header fields, need to preserve the header value since that will be used by subsequent (dcc,spamd,etc) milters
author Carl Byington <carl@five-ten-sg.com>
date Sun, 08 Jan 2017 21:13:01 -0800
parents 2fd904f2efc2
children ef7479b2d64f
line wrap: on
line diff
--- a/src/dnsbl.cpp	Mon Dec 26 16:31:35 2016 -0800
+++ b/src/dnsbl.cpp	Sun Jan 08 21:13:01 2017 -0800
@@ -1514,8 +1514,10 @@
                     int s1 = match[1].rm_so;    // domain
                     int e1 = match[1].rm_eo;
                     if (s1 != -1) {
+                        char save = value[e1];
                         value[e1] = '\0';
                         priv.dkim_signers.insert(strdup(value+s1));
+                        value[e1] = save;
                     }
                 }
             }
@@ -1531,8 +1533,10 @@
             int s1 = match[1].rm_so;    // domain
             int e1 = match[1].rm_eo;
             if (s1 != -1) {
+                char save = value[e1];
                 value[e1] = '\0';
                 priv.fromaddr = to_lower_string(value+s1, false);
+                value[e1] = save;
             }
         }
     }