]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Another try to deal with #1998 2012/head
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 Jan 2018 21:31:26 +0000 (21:31 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Sat, 3 Feb 2018 11:30:09 +0000 (13:30 +0200)
Issue: #1998

src/libserver/milter.c

index 2e66db1ef891a606a54b410a13501f43b834caf7..09c5d58f8b71b511d927f068895a0b5943f197b0 100644 (file)
@@ -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);