Re: Intent to T&R 2.2.12
2009/7/17 Nick Kew : > I've a faint recollection of someone raising this issue, > but a quick google didn't find it. Do you have a test-case > that provokes the bug you're fixing? http://markmail.org/message/jlc7t5edsjujbe37 ;-) Bob
Re: Intent to T&R 2.2.12
Lars Eilebrecht wrote: Jim Jagielski wrote: Over the weekend I'll be doing some final things with the intent to tag and roll 2.2.12 on Monday... I just realized that I still have one patch for 2.2.12 which fixes an SSI-related bug causing a segfault when handling regex back-references (see attachment). Heh. Missed the attachment earlier. I've a faint recollection of someone raising this issue, but a quick google didn't find it. Do you have a test-case that provokes the bug you're fixing? -- Nick Kew
Re: Intent to T&R 2.2.12
On Jul 17, 2009, at 9:49 AM, Lars Eilebrecht wrote: Jim Jagielski wrote: Over the weekend I'll be doing some final things with the intent to tag and roll 2.2.12 on Monday... I just realized that I still have one patch for 2.2.12 which fixes an SSI-related bug causing a segfault when handling regex back-references (see attachment). I didn't propose it yet for inclusion in 2.2.12 as I didn't had the chance to fix this in trunk yet. The code/api in trunk changed and I don't know if this bug actually exists in trunk. I don't know if I will have the time to do this over the weekend. ciao... -- Lars Eilebrecht l...@eilebrecht.net I'll look and review... Most likely we'll have enough others to see this thru :)
Re: Intent to T&R 2.2.12
Plüm, Rüdiger, VF-Group wrote: If you have time (fix in trunk, backport proposal) I will have a look at the proposal and vote on it to get it in. +1. Segfault sounds serious enough to prioritise! -- Nick Kew
RE: Intent to T&R 2.2.12
> -Original Message- > From: Lars Eilebrecht > Sent: Freitag, 17. Juli 2009 15:49 > To: dev@httpd.apache.org > Subject: Re: Intent to T&R 2.2.12 > > Jim Jagielski wrote: > > Over the weekend I'll be doing some final things with the intent > > to tag and roll 2.2.12 on Monday... > > I just realized that I still have one patch for 2.2.12 which fixes an > SSI-related bug causing a segfault when handling regex back-references > (see attachment). > > I didn't propose it yet for inclusion in 2.2.12 as I didn't had the > chance to fix this in trunk yet. The code/api in trunk changed > and I don't know if this bug actually exists in trunk. IMHO trunk should have the same problem as the code looks similar. > I don't know if I will have the time to do this over the weekend. If you have time (fix in trunk, backport proposal) I will have a look at the proposal and vote on it to get it in. Regards Rüdiger
Re: Intent to T&R 2.2.12
Jim Jagielski wrote: > Over the weekend I'll be doing some final things with the intent > to tag and roll 2.2.12 on Monday... I just realized that I still have one patch for 2.2.12 which fixes an SSI-related bug causing a segfault when handling regex back-references (see attachment). I didn't propose it yet for inclusion in 2.2.12 as I didn't had the chance to fix this in trunk yet. The code/api in trunk changed and I don't know if this bug actually exists in trunk. I don't know if I will have the time to do this over the weekend. ciao... -- Lars Eilebrecht l...@eilebrecht.net --- mod_include.c.orig 2008-12-17 14:27:41.0 + +++ mod_include.c 2009-02-27 15:39:22.0 + @@ -158,6 +158,7 @@ const char *rexp; apr_size_t nsub; ap_regmatch_t match[AP_MAX_REG_MATCH]; +int have_match; } backref_t; typedef struct { @@ -664,6 +665,11 @@ return NULL; } else { +if (!re->have_match || + re->match[idx].rm_so < 0 || re->match[idx].rm_eo < 0) { +return NULL; +} + if (re->nsub < idx || idx >= AP_MAX_REG_MATCH) { ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r, "regex capture $%" APR_SIZE_T_FMT @@ -672,10 +678,6 @@ return NULL; } -if (re->match[idx].rm_so < 0 || re->match[idx].rm_eo < 0) { -return NULL; -} - val = apr_pstrmemdup(ctx->dpool, re->source + re->match[idx].rm_so, re->match[idx].rm_eo - re->match[idx].rm_so); } @@ -923,7 +925,6 @@ { ap_regex_t *compiled; backref_t *re = ctx->intern->re; -int rc; compiled = ap_pregcomp(ctx->dpool, rexp, AP_REG_EXTENDED); if (!compiled) { @@ -939,10 +940,11 @@ re->source = apr_pstrdup(ctx->pool, string); re->rexp = apr_pstrdup(ctx->pool, rexp); re->nsub = compiled->re_nsub; -rc = !ap_regexec(compiled, string, AP_MAX_REG_MATCH, re->match, 0); +re->have_match = !ap_regexec(compiled, string, AP_MAX_REG_MATCH, + re->match, 0); ap_pregfree(ctx->dpool, compiled); -return rc; +return re->have_match; } static int get_ptoken(include_ctx_t *ctx, const char **parse, token_t *token, token_t *previous)
Intent to T&R 2.2.12
Over the weekend I'll be doing some final things with the intent to tag and roll 2.2.12 on Monday...