1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

core: check that regex is not NULL in function string_regcomp

This commit is contained in:
Sébastien Helleu
2014-07-05 10:17:28 +02:00
parent afa81c4594
commit e0e3f9fdee
+3
View File
@@ -922,6 +922,9 @@ string_regcomp (void *preg, const char *regex, int default_flags)
const char *ptr_regex;
int flags;
if (!regex)
return -1;
ptr_regex = string_regex_flags (regex, default_flags, &flags);
return regcomp ((regex_t *)preg, ptr_regex, flags);
}