summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Faurot <eric@cvs.openbsd.org>2016-08-20 20:47:09 +0000
committerEric Faurot <eric@cvs.openbsd.org>2016-08-20 20:47:09 +0000
commite6a6af676926bc2f5d0b46be88e569d6c3f1b9c3 (patch)
treebbc444ebc1c9789e18ec8ee429060a2e797b880d
parent97efd777854017b8cb945a074dd0d71e06bda42b (diff)
Properly initialize the message parser. fix a regression where the
message headers would not be altered as expected. ok gilles@
-rw-r--r--usr.sbin/smtpd/rfc2822.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/rfc2822.c b/usr.sbin/smtpd/rfc2822.c
index 0b80f352481..38c15428aac 100644
--- a/usr.sbin/smtpd/rfc2822.c
+++ b/usr.sbin/smtpd/rfc2822.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rfc2822.c,v 1.7 2016/02/04 22:35:17 eric Exp $ */
+/* $OpenBSD: rfc2822.c,v 1.8 2016/08/20 20:47:08 eric Exp $ */
/*
* Copyright (c) 2014 Gilles Chehade <gilles@poolp.org>
@@ -138,6 +138,7 @@ rfc2822_parser_init(struct rfc2822_parser *rp)
TAILQ_INIT(&rp->header.lines);
rfc2822_header_default_callback(rp, hdr_dflt_cb, NULL);
rfc2822_body_callback(rp, body_dflt_cb, NULL);
+ rfc2822_parser_reset(rp);
}
void