[mod_redirect,mod_rewrite] fix segfault w/ invalid syntax (fixes #2892)
(thx nti) x-ref: "Segmentation fault with invalid lighttpd.conf syntax" https://redmine.lighttpd.net/issues/2892personal/stbuehler/fix-fdevent
parent
255269d799
commit
f4f13745c8
|
@ -122,7 +122,7 @@ static void pcre_keyvalue_buffer_append_match(buffer *b, const char **list, int
|
|||
static void pcre_keyvalue_buffer_append_ctxmatch(buffer *b, pcre_keyvalue_ctx *ctx, unsigned int num, int flags) {
|
||||
const struct cond_cache_t * const cache = ctx->cache;
|
||||
if (!cache) return; /* no enclosing match context */
|
||||
if (num < (unsigned int)cache->patterncount) {
|
||||
if ((int)num < cache->patterncount) {
|
||||
const int off = cache->matches[(num <<= 1)]; /*(num *= 2)*/
|
||||
const int len = cache->matches[num+1] - off;
|
||||
burl_append(b, cache->comp_value->ptr + off, (size_t)len, flags);
|
||||
|
|
Loading…
Reference in New Issue