diff options
author | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-04-17 16:26:19 +0000 |
---|---|---|
committer | Jacek Masiulaniec <jacekm@cvs.openbsd.org> | 2009-04-17 16:26:19 +0000 |
commit | a7f92c5e88155c01d0de5b03626d3cbac8bc57d3 (patch) | |
tree | 45211a9fde8bd2cefa1961f687a491ea54a37392 /usr.sbin/smtpd/enqueue.c | |
parent | 0526fd1d555374f0b5b6aea25564fd7c206186a5 (diff) |
handle case when no input is provided, fixes confusing error:
$ echo -n | sendmail root
sendmail: write: connection closed
$
Diffstat (limited to 'usr.sbin/smtpd/enqueue.c')
-rw-r--r-- | usr.sbin/smtpd/enqueue.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c index bff3bcb90f6..24c27317646 100644 --- a/usr.sbin/smtpd/enqueue.c +++ b/usr.sbin/smtpd/enqueue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: enqueue.c,v 1.12 2009/04/16 15:35:06 jacekm Exp $ */ +/* $OpenBSD: enqueue.c,v 1.13 2009/04/17 16:26:18 jacekm Exp $ */ /* * Copyright (c) 2005 Henning Brauer <henning@bulabula.org> @@ -691,7 +691,8 @@ send_message(int noheader) if (noheader) femail_write("\r\n", 2); - femail_write(msg.data, msg.len); + if (msg.data != NULL) + femail_write(msg.data, msg.len); } void |