diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-10 14:35:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-09-10 14:35:57 +0100 |
commit | 7f615c8013e5e01893d2e3e4d10aeaa541663761 (patch) | |
tree | 1c62973107c7963efe43a87cfe7f25de68fb76d7 /src/libutil/multipattern.c | |
parent | ac594f21c5a74f32464285aad9106cfb31c0a63f (diff) | |
download | rspamd-7f615c8013e5e01893d2e3e4d10aeaa541663761.tar.gz rspamd-7f615c8013e5e01893d2e3e4d10aeaa541663761.zip |
[Minor] Fix nhits set in pcre fallback
Diffstat (limited to 'src/libutil/multipattern.c')
-rw-r--r-- | src/libutil/multipattern.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index 0fc028969..7e812a0bd 100644 --- a/src/libutil/multipattern.c +++ b/src/libutil/multipattern.c @@ -663,11 +663,20 @@ rspamd_multipattern_lookup (struct rspamd_multipattern *mp, &end, TRUE, NULL)) { - ret = rspamd_multipattern_acism_cb (i, end - in, &cbd); + if (rspamd_multipattern_acism_cb (i, end - in, &cbd)) { + goto out; + } } } +out: + ret = cbd.ret; + + if (pnfound) { + *pnfound = cbd.nfound; + } } else { + /* Plain trie */ ret = acism_lookup (mp->t, in, len, rspamd_multipattern_acism_cb, &cbd, &state, mp->flags & RSPAMD_MULTIPATTERN_ICASE); |