aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 ++;