summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J Stevens <paul@nfg.nl>2010-02-02 10:03:22 +0100
committerPaul J Stevens <paul@nfg.nl>2010-02-02 10:03:22 +0100
commit3087c2873d0a58af1d3405990c17accf007b1bae (patch)
tree64dc411fb2c648d30733b720a5e35ab4bcdaaa71
parente9775820656f152b4ba657714d5f790945f4006d (diff)
stress-testing lmtpv2.2.15
fixes a couple of segfaults during delivery
-rw-r--r--dbmail-message.c4
-rw-r--r--pipe.c4
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;
}
diff --git a/pipe.c b/pipe.c
index 91fae80e..bd127fb2 100644
--- a/pipe.c
+++ b/pipe.c
@@ -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;