summaryrefslogtreecommitdiffstats
path: root/src/libserver
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-19 11:52:41 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-19 11:52:41 +0100
commit7e18a13c219334e7467baf7bb7e07a0508196e0f (patch)
tree53829815ab13cf0569ea125e8313c588f9ce12d1 /src/libserver
parent5c0ff08acfcf4c26d3abfe9bf89bf8861a4cd4c2 (diff)
downloadrspamd-7e18a13c219334e7467baf7bb7e07a0508196e0f.tar.gz
rspamd-7e18a13c219334e7467baf7bb7e07a0508196e0f.zip
[Fix] Try to fix a specific case when processing milter protocol
Diffstat (limited to 'src/libserver')
-rw-r--r--src/libserver/milter.c6
1 files changed, 5 insertions, 1 deletions
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) {