commit a4d2691: [Fix] Fix regexp type check for pcre2
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jan 27 16:35:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-01-27 16:31:16 +0000
URL: https://github.com/rspamd/rspamd/commit/a4d2691a85bfa567cc9afe2b97fe2ae4a04a2fde (HEAD -> master)
[Fix] Fix regexp type check for pcre2
---
src/libutil/regexp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index f36bd04f9..b91ab819e 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -708,6 +708,11 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len,
mcontext = re->mcontext;
}
+ if (r == NULL) {
+ /* Invalid regexp type for the specified input */
+ return FALSE;
+ }
+
match_data = pcre2_match_data_create (re->ncaptures + 1, NULL);
#ifdef HAVE_PCRE_JIT
More information about the Commits
mailing list