From 5597c93b640b9ce6eacd6f1363481389c03fc3bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Fri, 8 Aug 2014 07:33:37 +0200 Subject: [PATCH] core: check that regex is not NULL in function string_replace_regex --- src/core/wee-string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 9e1965deb..488d332dc 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -1374,7 +1374,7 @@ string_replace_regex (const char *string, void *regex, const char *replace, int length, length_replace, start_offset, i, rc, end, last_match; regmatch_t regex_match[100]; - if (!string) + if (!string || !regex) return NULL; length = strlen (string) + 1;