summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd/enqueue.c
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-17 16:26:19 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-04-17 16:26:19 +0000
commita7f92c5e88155c01d0de5b03626d3cbac8bc57d3 (patch)
tree45211a9fde8bd2cefa1961f687a491ea54a37392 /usr.sbin/smtpd/enqueue.c
parent0526fd1d555374f0b5b6aea25564fd7c206186a5 (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.c5
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