diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2015-08-16 20:53:20 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2015-08-16 20:53:20 +0000 |
commit | 64ae35b1e08b3a348b5fc41ec758cd6bfac60122 (patch) | |
tree | b63a8225d6b9299c02ce9b22e98ef53ed5480565 /usr.sbin/smtpd | |
parent | d337a7593016a53c0bf06224a70f9624e7d9a433 (diff) |
when we switch valid_domainpart() from our own logic to using res_hnok() we
missed the fact that res_hnok() will consider an empty string as valid.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index 56451c5cf74..330878abf80 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.113 2015/05/06 08:37:47 gilles Exp $ */ +/* $OpenBSD: util.c,v 1.114 2015/08/16 20:53:19 gilles Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -494,6 +494,9 @@ valid_domainpart(const char *s) return 0; } + if (*s == '\0') + return 0; + return res_hnok(s); } |