From c636152ce66288bee45b388dd40b9dd036368f93 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 29 Jan 2018 21:31:26 +0000 Subject: [PATCH] [Fix] Another try to deal with #1998 Issue: #1998 --- 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 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); -- 2.39.5