1
0
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:
Sebastien Helleu
2010-12-09 23:09:49 +01:00
parent b4d58dd9da
commit ce269387a5
+1 -1
View File
@@ -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 (&reg, regex, REG_EXTENDED) != 0)