]> source.dussan.org Git - rspamd.git/commitdiff
Reset variable to avoid unexpected results.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Mar 2015 22:33:05 +0000 (22:33 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 23 Mar 2015 22:33:05 +0000 (22:33 +0000)
src/libmime/mime_expressions.c

index bf87d252d2dfede802e68d5b053f1b81922a63dc..4cfbcc7a6cbbc97d6c546189a8b7e3074ab0abd2 100644 (file)
@@ -638,6 +638,12 @@ rspamd_mime_regexp_element_process (struct rspamd_task *task,
                return r;
        }
 
+       /*
+        * Since we've queried cache for the value
+        * r could be RSPAMD_TASK_CACHE_NO_VALUE. Hence, we need to reset it here
+        * to avoid suspicious results
+        */
+       r = 0;
        if (len == 0) {
                len = strlen (data);
        }