]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix comparision
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 29 Jan 2018 07:38:12 +0000 (07:38 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Sat, 3 Feb 2018 11:29:52 +0000 (13:29 +0200)
Issue: #1998
MFH: rspamd-1.6

src/libserver/milter.c

index ad95f63b22d72473ef618586b70217db85dd57db..01d22abfcb38e75e7e2d7824d1fcd7662cb3d064 100644 (file)
@@ -447,7 +447,7 @@ rspamd_milter_process_command (struct rspamd_milter_session *session,
                while (pos < end) {
                        zero = memchr (pos, '\0', cmdlen);
 
-                       if (zero == NULL || end >= zero) {
+                       if (zero == NULL || zero >= end) {
                                err = g_error_new (rspamd_milter_quark (), EINVAL, "invalid "
                                                "macro command (no name)");
                                rspamd_milter_on_protocol_error (session, priv, err);