diff options
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r-- | src/libutil/regexp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 90920a95e..5b928bcb4 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -693,6 +693,10 @@ rspamd_regexp_search (const rspamd_regexp_t *re, const gchar *text, gsize len, len = strlen (text); } + if (re->match_limit > 0 && len > re->match_limit) { + len = re->match_limit; + } + if (end != NULL && *end != NULL) { /* Incremental search */ mt = (*end); |