From: Vsevolod Stakhov Date: Thu, 14 Apr 2016 14:12:17 +0000 (+0100) Subject: [Fix] Try to handle hyperscan error X-Git-Tag: 1.2.4~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5a312b65b3aa2539eeb483a04126f5f6a2b0014;p=thirdparty%2Frspamd.git [Fix] Try to handle hyperscan error --- diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index b3e01330fe..d5e038654c 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 ++;