aboutsummaryrefslogtreecommitdiffstats
path: root/sink.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2007-07-29 09:36:23 +0000
committerMatthias Andree <matthias.andree@gmx.de>2007-07-29 09:36:23 +0000
commit481e6bffbb7c3fd686464478b90a0373c807951c (patch)
treeb7a2e0a5090829aa857c6335ea3d7eb99aea5c96 /sink.c
parent1cdd882de1191a63cc2e9efc061ea1425f7d8904 (diff)
downloadfetchmail-481e6bffbb7c3fd686464478b90a0373c807951c.tar.gz
fetchmail-481e6bffbb7c3fd686464478b90a0373c807951c.tar.bz2
fetchmail-481e6bffbb7c3fd686464478b90a0373c807951c.zip
Fix long-standing (since r2215/v4.6.8) crash on NULL pointer dereference
when the local SMTP listener rejects a warning message of fetchmail's. Report and suggested fix by Earl Chew. svn path=/branches/BRANCH_6-3/; revision=5119
Diffstat (limited to 'sink.c')
-rw-r--r--sink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sink.c b/sink.c
index 9dd9ce70..47a40427 100644
--- a/sink.c
+++ b/sink.c
@@ -262,7 +262,7 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg,
const char *md1 = "MAILER-DAEMON", *md2 = "MAILER-DAEMON@";
/* don't bounce in reply to undeliverable bounces */
- if (!msg->return_path[0] ||
+ if (!msg || !msg->return_path[0] ||
strcmp(msg->return_path, "<>") == 0 ||
strcasecmp(msg->return_path, md1) == 0 ||
strncasecmp(msg->return_path, md2, strlen(md2)) == 0)