diff options
Diffstat (limited to 'src/libutil/multipattern.c')
-rw-r--r-- | src/libutil/multipattern.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/multipattern.c b/src/libutil/multipattern.c index 3c9be0df3..9ae798bb9 100644 --- a/src/libutil/multipattern.c +++ b/src/libutil/multipattern.c @@ -717,6 +717,10 @@ int rspamd_multipattern_lookup(struct rspamd_multipattern *mp, &end, TRUE, NULL)) { + if (start >= end) { + /* We found all matches, so no more hits are possible (protect from empty patterns) */ + break; + } if (rspamd_multipattern_acism_cb(i, end - in, &cbd)) { goto out; } |