]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Try to handle hyperscan error
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 Apr 2016 14:12:17 +0000 (15:12 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 14 Apr 2016 14:12:17 +0000 (15:12 +0100)
src/libutil/multipattern.c

index b3e01330fe0b0f309c7b922c6ec199b3ef75a6d8..d5e038654c8ed3c86a8a9806ec8897b87a99e531 100644 (file)
@@ -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 ++;