diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 22:07:24 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2003-10-10 22:07:24 +0000 |
commit | a9c74c7425861cabc87f74fbce49e0da7af5e756 (patch) | |
tree | fbeb8e0e06b37ac6404b59a33af7ee5ac4b58667 | |
parent | c3a31dcb427164135c922ef29404c31d7e876904 (diff) | |
download | fetchmail-a9c74c7425861cabc87f74fbce49e0da7af5e756.tar.gz fetchmail-a9c74c7425861cabc87f74fbce49e0da7af5e756.tar.bz2 fetchmail-a9c74c7425861cabc87f74fbce49e0da7af5e756.zip |
Prevent a SIGSEGV that happens when
a. daemon mode is active
b. size limits are active
c. -N is NOT being used
svn path=/trunk/; revision=3857
-rw-r--r-- | sink.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -422,8 +422,11 @@ static int send_bouncemail(struct query *ctl, struct msgblk *msg, SockPrintf(sock, "--%s\r\n", boundary); SockPrintf(sock, "Content-Type: text/rfc822-headers\r\n"); SockPrintf(sock, "\r\n"); - SockWrite(sock, msg->headers, strlen(msg->headers)); - SockPrintf(sock, "\r\n"); + if (msg->headers) + { + SockWrite(sock, msg->headers, strlen(msg->headers)); + SockPrintf(sock, "\r\n"); + } SockPrintf(sock, "--%s--\r\n", boundary); if (SMTP_eom(sock) != SM_OK || SMTP_quit(sock)) @@ -1511,7 +1514,7 @@ int open_warning_by_mail(struct query *ctl, struct msgblk *msg) } else /* send to postmaster */ status = open_sink(ctl, &reply, &good, &bad); - stuff_warning(ctl, "Date: %s", rfc822timestamp()); + if (status == 0) stuff_warning(ctl, "Date: %s", rfc822timestamp()); return(status); } |