aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-23 22:33:05 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-23 22:33:05 +0000
commit8af3fbb201d248d949849aaf0046c99e3642ca76 (patch)
treebc53b3e28989cbea0ef845c18abab91f26825095
parentcb677b055c2ef399e2a0cde0a098d6adbff0d54c (diff)
downloadrspamd-8af3fbb201d248d949849aaf0046c99e3642ca76.tar.gz
rspamd-8af3fbb201d248d949849aaf0046c99e3642ca76.zip
Reset variable to avoid unexpected results.
-rw-r--r--src/libmime/mime_expressions.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmime/mime_expressions.c b/src/libmime/mime_expressions.c
index bf87d252d..4cfbcc7a6 100644
--- a/src/libmime/mime_expressions.c
+++ b/src/libmime/mime_expressions.c
@@ -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);
}