aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/multipattern.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-14 15:12:17 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-04-14 15:12:17 +0100
commita5a312b65b3aa2539eeb483a04126f5f6a2b0014 (patch)
treeecfc6f8547b457cbe1217adc001b9569cda0294f /src/libutil/multipattern.c
parent9a56acc7f91d27a35b7d05d5f4ad5ba989e98612 (diff)
downloadrspamd-a5a312b65b3aa2539eeb483a04126f5f6a2b0014.tar.gz
rspamd-a5a312b65b3aa2539eeb483a04126f5f6a2b0014.zip
[Fix] Try to handle hyperscan error
Diffstat (limited to 'src/libutil/multipattern.c')
-rw-r--r--src/libutil/multipattern.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c
index b3e01330f..d5e038654 100644
--- a/src/libutil/multipattern.c
+++ b/src/libutil/multipattern.c
@@ -502,6 +502,11 @@ rspamd_multipattern_hs_cb (unsigned int id,
gint ret = 0;
if (to > 0) {
+
+ if (from == HS_OFFSET_PAST_HORIZON) {
+ from = 0;
+ }
+
ret = cbd->cb (cbd->mp, id, from, to - 1, cbd->in, cbd->len, cbd->ud);
cbd->nfound ++;