summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-12-12 10:14:08 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2009-12-12 10:14:08 +0000
commit26ca1705c8c1bcff436db5b16871b448eef40ed9 (patch)
tree8f5ee7fd0e52cad56b26968f31b9019105f57774 /usr.sbin
parent61bf05d6b935be4fa8a65cdfeba6d0d01a750181 (diff)
Don't qualify empty sender address with the domain, eg. in sendmail -f "<>".
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/smtpd/enqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/enqueue.c b/usr.sbin/smtpd/enqueue.c
index 4f4cc9c76ce..8adef042444 100644
--- a/usr.sbin/smtpd/enqueue.c
+++ b/usr.sbin/smtpd/enqueue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: enqueue.c,v 1.26 2009/11/13 20:34:51 chl Exp $ */
+/* $OpenBSD: enqueue.c,v 1.27 2009/12/12 10:14:07 jacekm Exp $ */
/*
* Copyright (c) 2005 Henning Brauer <henning@bulabula.org>
@@ -478,7 +478,7 @@ qualify_addr(char *in)
{
char *out;
- if (strchr(in, '@') == NULL) {
+ if (strlen(in) > 0 && strchr(in, '@') == NULL) {
if (asprintf(&out, "%s@%s", in, host) == -1)
err(1, "qualify asprintf");
} else