diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-09 23:09:49 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-12-09 23:09:49 +0100 |
commit | ce269387a55939eacc43c90aec432d3edd1f999f (patch) | |
tree | 79e7f3607dd66b4dbcfcd24f9e03fe0bd0d4b7fe /src/core/wee-string.c | |
parent | b4d58dd9dafafe55ea9d05bca8e47761b56ab27a (diff) | |
download | weechat-ce269387a55939eacc43c90aec432d3edd1f999f.zip |
Fix infinite loop in API function string_has_highlight_regex if regex is empty
Diffstat (limited to 'src/core/wee-string.c')
-rw-r--r-- | src/core/wee-string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 24224ccf8..a4c29c923 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -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) |