summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qmail-smtpd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/qmail-smtpd.c b/qmail-smtpd.c
index 7d062a2..1064008 100644
--- a/qmail-smtpd.c
+++ b/qmail-smtpd.c
@@ -171,6 +171,7 @@ char *arg;
arg += i + 1;
else { /* partner should go read rfc 821 */
terminator = ' ';
+/* The following fails insidiously if there's no ':' */
arg += str_chr(arg,':');
if (*arg == ':') ++arg;
while (*arg == ' ') ++arg;
@@ -211,7 +212,9 @@ char *arg;
}
}
+/* returning 0 will provoke a "555 syntax error" */
if (addr.len > 900) return 0;
+ if (addr.len == 0 || addr.s[0] == 0) return 0;
return 1;
}