# HG changeset patch # User Carl Byington # Date 1482112516 28800 # Node ID b4f766947202aeefde4c16be856348dd010c3380 # Parent 51846836ec921a79a7d034170b1dc19b4e33e478 allow multiple dkim signers in authentication results diff -r 51846836ec92 -r b4f766947202 src/dnsbl.cpp --- a/src/dnsbl.cpp Sun Dec 18 17:19:50 2016 -0800 +++ b/src/dnsbl.cpp Sun Dec 18 17:55:16 2016 -0800 @@ -324,7 +324,7 @@ return ip.s_addr; } } - int n = strlen(question); + size_t n = strlen(question); if (question[n-1] == '.') { priv.my_write(question, n+1); // write the question including the null terminator } @@ -1104,18 +1104,16 @@ const char *to_lower_string(const char *email); const char *to_lower_string(const char *email) { if (!email) return strdup("<>"); - int n = strlen(email); - if (n == 0) return strdup("<>"); - if (email[0] == '<') { - // assume it also ends with > - n -= 2; - if (n < 1) return strdup("<>"); - email++; - } - if ((email[0] == '\'') && (email[n-1] == '\'') && (n > 2)) { + size_t n = strlen(email); + if ((n > 1) && (email[0] == '<') && (email[n-1] == '>')) { n -= 2; email++; } + if ((n > 1) && (email[0] == '\'') && (email[n-1] == '\'')) { + n -= 2; + email++; + } + if (n ==0) return strdup("<>"); char *key = strdup(email); key[n] = '\0'; for (int i=0; i 2) && (strcasecmp(headerf, "from"))) { const int nmatch = 2; regmatch_t match[nmatch]; @@ -1502,7 +1502,6 @@ } } } - } // headers that avoid autowhitelisting if (((strcasecmp(headerf, "precedence") == 0) && (strcasecmp(headerv, "bulk") == 0)) ||