Mercurial > dnsbl
diff src/context.cpp @ 195:797299e9fffc stable-6-0-15
fix null dereference if missing _ macro
author | carl |
---|---|
date | Fri, 07 Dec 2007 16:59:41 -0800 |
parents | 8f4a9a37d4d9 |
children | 92a5c866bdfa |
line wrap: on
line diff
--- a/src/context.cpp Sun Nov 11 13:21:48 2007 -0800 +++ b/src/context.cpp Fri Dec 07 16:59:41 2007 -0800 @@ -486,10 +486,7 @@ if (when < limit) { char *who = (*i).first; free(who); - autowhite_sent::iterator j = i; - j++; - rcpts.erase(i); - i = j; + rcpts.erase(i++); need = true; } else i++; @@ -756,6 +753,7 @@ char *CONTEXT::generic_match(char *client) { + if (!client) return NULL; // allow missing _ macro, which will disable generic checking if (parent && !generic_regx) return parent->generic_match(client); if (!generic_regx) return NULL; if (0 == regexec(&generic_pattern, client, 0, NULL, 0)) {