diff options
author | 2015-08-16 20:53:19 +0000 | |
---|---|---|
committer | 2015-08-16 20:53:19 +0000 | |
commit | 5f2c0e3c676f292f1311b34dc133535262d942cf (patch) | |
tree | 3d8793300b53846194cadbfe66bfe277b38c49a8 | |
parent | Fix test against INADDR_LOOPBACK (diff) | |
download | wireguard-openbsd-5f2c0e3c676f292f1311b34dc133535262d942cf.tar.xz wireguard-openbsd-5f2c0e3c676f292f1311b34dc133535262d942cf.zip |
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.
-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); } |