mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
Fix infinite loop in API function string_has_highlight_regex if regex is empty
This commit is contained in:
@@ -766,7 +766,7 @@ string_has_highlight_regex (const char *string, const char *regex)
|
||||
regex_t reg;
|
||||
int rc;
|
||||
|
||||
if (!string || !regex)
|
||||
if (!string || !regex || !regex[0])
|
||||
return 0;
|
||||
|
||||
if (regcomp (®, regex, REG_EXTENDED) != 0)
|
||||
|
||||
Reference in New Issue
Block a user