From 7e18a13c219334e7467baf7bb7e07a0508196e0f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 19 Apr 2018 11:52:41 +0100 Subject: [Fix] Try to fix a specific case when processing milter protocol --- src/libserver/milter.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libserver/milter.c') diff --git a/src/libserver/milter.c b/src/libserver/milter.c index ba00420f6..010f2215a 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -790,7 +790,10 @@ rspamd_milter_consume_input (struct rspamd_milter_session *session, end = priv->parser.buf->str + priv->parser.buf->len; while (p < end) { - msg_debug_milter("offset: %d, state: %d", (gint)(p - (const guchar *)priv->parser.buf->str), priv->parser.state); + msg_debug_milter("offset: %d, state: %d", + (gint)(p - (const guchar *)priv->parser.buf->str), + priv->parser.state); + switch (priv->parser.state) { case st_len_1: /* The first length byte in big endian order */ @@ -908,6 +911,7 @@ rspamd_milter_consume_input (struct rspamd_milter_session *session, if (p == end) { priv->parser.buf->len = 0; priv->parser.pos = 0; + priv->parser.cmd_start = 0; } if (priv->out_chain) { -- cgit v1.2.3