Browse Source

[Fix] Try to fix a specific case when processing milter protocol

tags/1.7.4
Vsevolod Stakhov 6 years ago
parent
commit
7e18a13c21
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      src/libserver/milter.c

+ 5
- 1
src/libserver/milter.c View File

@@ -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) {

Loading…
Cancel
Save