1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 06:16:40 +02:00

core: check that regex is not NULL in function string_replace_regex

This commit is contained in:
Sébastien Helleu
2014-08-08 07:33:37 +02:00
parent e7b604c97e
commit 5597c93b64
+1 -1
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;