aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 18:33:45 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-27 18:33:45 +0000
commit8c0970499e5aa238df5e12cabba9f10388c56215 (patch)
treecb33a553d2d8abe593f1b4b5d725894426d4ea86 /src/libutil/regexp.c
parente2cb16d8f40cd7193b27e05c88aa23e0639d38be (diff)
downloadrspamd-8c0970499e5aa238df5e12cabba9f10388c56215.tar.gz
rspamd-8c0970499e5aa238df5e12cabba9f10388c56215.zip
[Fix] Some fixes for raw parts
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c6
1 files changed, 5 insertions, 1 deletions
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);