mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 05:46:38 +02:00
core: check that regex is not NULL in function string_regex_flags
This commit is contained in:
@@ -854,10 +854,13 @@ string_regex_flags (const char *regex, int default_flags, int *flags)
|
||||
int set_flag, flag;
|
||||
char *pos;
|
||||
|
||||
ptr_regex = regex;
|
||||
if (flags)
|
||||
*flags = default_flags;
|
||||
|
||||
if (!regex)
|
||||
return NULL;
|
||||
|
||||
ptr_regex = regex;
|
||||
while (strncmp (ptr_regex, "(?", 2) == 0)
|
||||
{
|
||||
pos = strchr (ptr_regex, ')');
|
||||
|
||||
Reference in New Issue
Block a user