summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgilles <gilles@openbsd.org>2014-10-15 19:23:29 +0000
committergilles <gilles@openbsd.org>2014-10-15 19:23:29 +0000
commit37977e391e48dc815fe3d2193edc27cb86249377 (patch)
tree7c0acfb7a25f9cf682460735e18685362be03673
parentsome choice thoughts on back compat (diff)
downloadwireguard-openbsd-37977e391e48dc815fe3d2193edc27cb86249377.tar.xz
wireguard-openbsd-37977e391e48dc815fe3d2193edc27cb86249377.zip
- allow empty headers
-rw-r--r--usr.sbin/smtpd/rfc2822.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/rfc2822.c b/usr.sbin/smtpd/rfc2822.c
index 61c7b7696c8..023224d46af 100644
--- a/usr.sbin/smtpd/rfc2822.c
+++ b/usr.sbin/smtpd/rfc2822.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc2822.c,v 1.1 2014/10/12 16:19:30 gilles Exp $ */
+/* $OpenBSD: rfc2822.c,v 1.2 2014/10/15 19:23:29 gilles Exp $ */
/*
* Copyright (c) 2014 Gilles Chehade <gilles@poolp.org>
@@ -75,8 +75,8 @@ parser_feed_header(struct rfc2822_parser *rp, char *line)
struct rfc2822_line *hdrline;
char *pos;
- /* new header */
- if (! isspace(*line)) {
+ /* new header */
+ if (! isspace(*line) && *line != '\0') {
rp->in_hdr = 1;
if ((pos = strchr(line, ':')) == NULL)
return 0;