From a5a312b65b3aa2539eeb483a04126f5f6a2b0014 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 Apr 2016 15:12:17 +0100 Subject: [PATCH] [Fix] Try to handle hyperscan error --- src/libutil/multipattern.c | 5 +++++ 1 file changed, 5 insertions(+) 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 ++; -- 2.39.5