From 64ae35b1e08b3a348b5fc41ec758cd6bfac60122 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Sun, 16 Aug 2015 20:53:20 +0000 Subject: 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. --- usr.sbin/smtpd/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.sbin/smtpd') 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); } -- cgit v1.2.3