From 8c0970499e5aa238df5e12cabba9f10388c56215 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 27 Nov 2018 18:33:45 +0000 Subject: [Fix] Some fixes for raw parts --- src/libutil/regexp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/libutil') diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index f0f16f423..a3246ae9f 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -570,7 +570,11 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, #endif } - g_assert (r != NULL); + if (r == NULL) { + /* Invalid regexp type for the specified input */ + return FALSE; + } + ncaptures = (re->ncaptures + 1) * 3; ovec = g_alloca (sizeof (gint) * ncaptures); -- cgit v1.2.3