diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2015-07-26 12:05:08 -0300 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2015-07-26 12:05:08 -0300 |
commit | b84cdb54428bfe77168d9532704e4532c0ff0d1d (patch) | |
tree | 30dffda4c03326ab9b721726e18daac840815fbb | |
parent | c9b8164b7e7a829fc6e80c5879a5ba7e7448a3fb (diff) | |
download | httpd-b84cdb54428bfe77168d9532704e4532c0ff0d1d.tar.gz httpd-b84cdb54428bfe77168d9532704e4532c0ff0d1d.zip |
str_find_aux() might return a negative number
It might return the return value of match_error(), which returns
(-1).
-rw-r--r-- | httpd/patterns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/httpd/patterns.c b/httpd/patterns.c index 27a813f..34bd52b 100644 --- a/httpd/patterns.c +++ b/httpd/patterns.c @@ -673,7 +673,7 @@ str_match(const char *string, const char *pattern, struct str_match *m, memset(m, 0, sizeof(*m)); ret = str_find_aux(&ms, pattern, string, sm, nsm, 0); - if (ret == 0 || ms.error != NULL) { + if (ret <= 0 || ms.error != NULL) { /* Return -1 on error and store the error string */ *errstr = ms.error; return (-1); |