diff src/dnsbl.cpp @ 415:16451edcb962

spf code now handles mx,exists,ptr tags, multiple A records, %{i} macro
author Carl Byington <carl@five-ten-sg.com>
date Tue, 25 Apr 2017 15:23:33 -0700
parents d5a1ed33d3ae
children 91f2a127ec69
line wrap: on
line diff
--- a/src/dnsbl.cpp	Tue Apr 25 14:48:19 2017 -0700
+++ b/src/dnsbl.cpp	Tue Apr 25 15:23:33 2017 -0700
@@ -435,11 +435,11 @@
                 while (ns_parserr(&handle, ns_s_an, rrnum++, &rr) == 0) {
                     if (ns_rr_type(rr) == qtype) {
                         char exchange[NS_MAXDNAME];
-                        size_t rdlen = ns_rr_rdlen(rr);
+                        //size_t rdlen = ns_rr_rdlen(rr);
+                        //const uint16_t pri = ns_get16(rdata);
                         const unsigned char *rdata = ns_rr_rdata(rr);
-                        const uint16_t pri = ns_get16(rdata);
                         int len = dn_expand(glom.answer, glom.answer+glom.length, rdata + 2, exchange, sizeof(exchange));
-                        if ((len > 0) && (my_size > len+2)) {
+                        if ((len > 0) && (my_size > (uint32_t)len+2)) {
                             strcpy(my_answer, exchange);
                             my_answer += len + 1;
                             my_size   -= len + 1;
@@ -1733,7 +1733,7 @@
         }
 
         CONTEXT *con = NULL;
-        const char *st;
+        const char *st = token_black;
         for (context_map::iterator i=priv.env_to.begin(); i!=priv.env_to.end(); i++) {
             const char *rcpt = (*i).first;
             CONTEXT    *next = (*i).second;