Fix pcre_exec's return type

According to PCRE_EXEC(3) pcre_exec returns int.

The original code uses char but char could be either signed or
unsigned. On armel and sparc this caused segment fault because
the (rc < 0) error checking was optimized out.
This commit is contained in:
Kan-Ru Chen (陳侃如) 2014-08-04 01:07:37 +08:00
parent 8c5b25949e
commit 3629452fe0

View file

@ -327,7 +327,7 @@ node * r3_tree_matchl(const node * n, const char * path, int path_len, match_ent
const char *substring_start = NULL;
int substring_length = 0;
int ov[ n->ov_cnt ];
char rc;
int rc;
info("pcre matching %s on %s\n", n->combined_pattern, path);