diff options
author | Paul J Stevens <paul@nfg.nl> | 2010-02-02 10:03:22 +0100 |
---|---|---|
committer | Paul J Stevens <paul@nfg.nl> | 2010-02-02 10:03:22 +0100 |
commit | 3087c2873d0a58af1d3405990c17accf007b1bae (patch) | |
tree | 64dc411fb2c648d30733b720a5e35ab4bcdaaa71 | |
parent | e9775820656f152b4ba657714d5f790945f4006d (diff) |
stress-testing lmtpv2.2.15
fixes a couple of segfaults during delivery
-rw-r--r-- | dbmail-message.c | 4 | ||||
-rw-r--r-- | pipe.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/dbmail-message.c b/dbmail-message.c index 3f589eb5..e8ebe900 100644 --- a/dbmail-message.c +++ b/dbmail-message.c @@ -1066,9 +1066,9 @@ static void insert_address_cache(u64_t physid, const char *field, InternetAddres for (; ialist != NULL && ialist->address; ialist = ialist->next) { ia = ialist->address; - g_return_if_fail(ia != NULL); + if (! ia) break; - if (g_mime_utils_text_is_8bit((unsigned char *)ia->value.addr, strlen(ia->value.addr))) { + if (ia->value.addr && g_mime_utils_text_is_8bit((unsigned char *)ia->value.addr, strlen(ia->value.addr))) { TRACE(TRACE_INFO, "skip 8bit address"); continue; } @@ -347,9 +347,9 @@ static int check_destination(struct DbmailMessage *message, GList *aliases) while (recipients && (! check)) { char *addr = (char *)recipients->data; aliases = g_list_first(aliases); - while (aliases && (!check)) { + while (addr && aliases && (!check)) { char *alias = (char *)aliases->data; - if (MATCH(alias, addr)) { + if (alias && MATCH(alias, addr)) { TRACE(TRACE_DEBUG, "valid alias found as recipient [%s]", alias); check = TRUE; break; |