commit c332ab3: [Minor] Do not mix HS_FLAG_SINGLEMATCH and HS_FLAG_SOM_LEFTMOST
Vsevolod Stakhov
vsevolod at highsecure.ru
Tue Nov 17 11:28:07 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-11-17 11:20:58 +0000
URL: https://github.com/rspamd/rspamd/commit/c332ab330cea11ec81939ac9aee102de663fbad0
[Minor] Do not mix HS_FLAG_SINGLEMATCH and HS_FLAG_SOM_LEFTMOST
---
src/libserver/re_cache.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c
index c35da879d..e4b00e541 100644
--- a/src/libserver/re_cache.c
+++ b/src/libserver/re_cache.c
@@ -1977,13 +1977,14 @@ rspamd_re_cache_compile_timer_cb (EV_P_ ev_timer *w, int revents )
if (pcre_flags & PCRE_FLAG(DOTALL)) {
hs_flags[i] |= HS_FLAG_DOTALL;
}
- if (rspamd_regexp_get_maxhits (re) == 1) {
- hs_flags[i] |= HS_FLAG_SINGLEMATCH;
- }
+
if (re_flags & RSPAMD_REGEXP_FLAG_LEFTMOST) {
hs_flags[i] |= HS_FLAG_SOM_LEFTMOST;
}
+ else if (rspamd_regexp_get_maxhits (re) == 1) {
+ hs_flags[i] |= HS_FLAG_SINGLEMATCH;
+ }
gchar *pat = rspamd_re_cache_hs_pattern_from_pcre (re);
More information about the Commits
mailing list