diff options
-rw-r--r-- | usr.sbin/smtpd/smtp_session.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/smtp_session.c b/usr.sbin/smtpd/smtp_session.c index 51508d70a78..396f3ef3fb1 100644 --- a/usr.sbin/smtpd/smtp_session.c +++ b/usr.sbin/smtpd/smtp_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: smtp_session.c,v 1.163 2012/08/10 11:05:55 eric Exp $ */ +/* $OpenBSD: smtp_session.c,v 1.164 2012/08/18 16:05:54 chl Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -329,7 +329,7 @@ session_rfc1652_mail_handler(struct session *s, char *args) static int session_rfc5321_helo_handler(struct session *s, char *args) { - if (args == NULL) { + if (args == NULL || !valid_domainpart(args)) { session_respond(s, "501 HELO requires domain address"); return 1; } @@ -352,7 +352,7 @@ session_rfc5321_helo_handler(struct session *s, char *args) static int session_rfc5321_ehlo_handler(struct session *s, char *args) { - if (args == NULL) { + if (args == NULL || !valid_domainpart(args)) { session_respond(s, "501 EHLO requires domain address"); return 1; } |