From 421435ebca3e4aae4da454eea10367755772a6fd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 29 Jan 2018 20:16:08 +0000 Subject: [Fix] Another try to fix #1998 Issue: #1998 MFH: rspamd-1.6 --- src/libserver/milter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libserver/milter.c b/src/libserver/milter.c index 6ebf48838..535184289 100644 --- a/src/libserver/milter.c +++ b/src/libserver/milter.c @@ -462,7 +462,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)); + zero_val = memchr (zero + 1, '\0', cmdlen - (end - zero - 1)); if (zero_val != NULL && end > zero_val) { name = rspamd_fstring_new_init (pos, zero - pos); -- cgit v1.2.3