core: check that regex is not NULL in function string_replace_regex

v2.8-utf8proc
Sébastien Helleu 2014-08-08 07:33:37 +02:00
parent e7b604c97e
commit 5597c93b64
1 changed files with 1 additions and 1 deletions

View File

@ -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;