changeset 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 90fdc4afba26
children 043424ccb5f7
files src/dnsbl.cpp
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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;
             }
         }
     }