diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-14 15:12:17 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-04-14 15:12:17 +0100 |
commit | a5a312b65b3aa2539eeb483a04126f5f6a2b0014 (patch) | |
tree | ecfc6f8547b457cbe1217adc001b9569cda0294f | |
parent | 9a56acc7f91d27a35b7d05d5f4ad5ba989e98612 (diff) | |
download | rspamd-a5a312b65b3aa2539eeb483a04126f5f6a2b0014.tar.gz rspamd-a5a312b65b3aa2539eeb483a04126f5f6a2b0014.zip |
[Fix] Try to handle hyperscan error
-rw-r--r-- | src/libutil/multipattern.c | 5 |
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 ++; |