summaryrefslogtreecommitdiff
path: root/src/core/wee-string.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-12-09 23:09:49 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-12-09 23:09:49 +0100
commitce269387a55939eacc43c90aec432d3edd1f999f (patch)
tree79e7f3607dd66b4dbcfcd24f9e03fe0bd0d4b7fe /src/core/wee-string.c
parentb4d58dd9dafafe55ea9d05bca8e47761b56ab27a (diff)
downloadweechat-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.c2
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 (&reg, regex, REG_EXTENDED) != 0)