From: Vsevolod Stakhov Date: Mon, 29 Jan 2018 21:31:26 +0000 (+0000) Subject: [Fix] Another try to deal with #1998 X-Git-Tag: 1.6.6~2^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F2012%2Fhead;p=rspamd.git [Fix] Another try to deal with #1998 Issue: #1998 --- diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 2e66db1ef..09c5d58f8 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -459,7 +459,7 @@ rspamd_milter_process_command (struct rspamd_milter_session *session, rspamd_ftok_t *name_tok, *value_tok; const guchar *zero_val; - zero_val = memchr (zero + 1, '\0', cmdlen - (end - zero - 1)); + zero_val = memchr (zero + 1, '\0', end - zero - 1); if (zero_val != NULL && end > zero_val) { name = rspamd_fstring_new_init (pos, zero - pos);