You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ni...@apache.org on 2009/07/19 23:54:37 UTC
svn commit: r795642 - /httpd/httpd/trunk/modules/filters/mod_include.c
Author: niq
Date: Sun Jul 19 21:54:36 2009
New Revision: 795642
URL: http://svn.apache.org/viewvc?rev=795642&view=rev
Log:
Update r795445 patch in the light of rpluem's comments on-list
Modified:
httpd/httpd/trunk/modules/filters/mod_include.c
Modified: httpd/httpd/trunk/modules/filters/mod_include.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_include.c?rev=795642&r1=795641&r2=795642&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_include.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_include.c Sun Jul 19 21:54:36 2009
@@ -611,7 +611,11 @@
idx, r->filename);
return NULL;
}
- else if (re->match[idx].rm_so == re->match[idx].rm_eo) {
+ else if (re->nsub < idx || idx >= AP_MAX_REG_MATCH) {
+ ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
+ "regex capture $%" APR_SIZE_T_FMT
+ " is out of range (last regex was: '%s') in %s",
+ idx, re->rexp, r->filename);
return NULL;
}
else if (re->match[idx].rm_so < 0 || re->match[idx].rm_eo < 0) {
@@ -620,13 +624,6 @@
*/
return NULL;
}
- else if (re->nsub < idx || idx >= AP_MAX_REG_MATCH) {
- ap_log_rerror(APLOG_MARK, APLOG_WARNING, 0, r,
- "regex capture $%" APR_SIZE_T_FMT
- " is out of range (last regex was: '%s') in %s",
- idx, re->rexp, r->filename);
- return NULL;
- }
else {
val = apr_pstrmemdup(ctx->dpool, re->source + re->match[idx].rm_so,