diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-26 17:26:03 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-26 17:26:30 +0100 |
commit | 5c4c2ea802a22efc71842150d12862cdf7a5ca12 (patch) | |
tree | b60fddb005e87d21d6e039750d19f7f3f6dab71d | |
parent | 22d602b81fe3315007075f7807bb9d944a72cb94 (diff) | |
download | rspamd-5c4c2ea802a22efc71842150d12862cdf7a5ca12.tar.gz rspamd-5c4c2ea802a22efc71842150d12862cdf7a5ca12.zip |
[Fix] Fix extra hits in PCRE mode for regular expressions
MFH: rspamd-1.6
Issue: #1880
-rw-r--r-- | src/libserver/re_cache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index d34cc6824..5bb153872 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -527,6 +527,7 @@ rspamd_re_cache_process_pcre (struct rspamd_re_runtime *rt, } } + rt->results[id] += r; rt->stat.regexp_checked++; rt->stat.bytes_scanned_pcre += len; rt->stat.bytes_scanned += len; @@ -593,13 +594,12 @@ rspamd_re_cache_hyperscan_cb (unsigned int id, processed = 0; for (i = 0; i < cbdata->count; i ++) { - ret = rspamd_re_cache_process_pcre (rt, + rspamd_re_cache_process_pcre (rt, pcre_elt->re, cbdata->task, cbdata->ins[i], cbdata->lens[i], FALSE); - rt->results[id] = ret; setbit (rt->checked, id); processed += cbdata->lens[i]; @@ -665,7 +665,6 @@ rspamd_re_cache_process_regexp_data (struct rspamd_re_runtime *rt, in[i], lens[i], is_raw); - rt->results[re_id] += ret; } setbit (rt->checked, re_id); |