summaryrefslogtreecommitdiffstats
path: root/modules/metadata
diff options
context:
space:
mode:
authorSander Striker <striker@apache.org>2003-10-24 18:20:28 +0200
committerSander Striker <striker@apache.org>2003-10-24 18:20:28 +0200
commit67a3a718776eaab2699f55e61a3472af04a7b751 (patch)
treeaf267fefd1294b4d80bde34d080b91e2a3f43020 /modules/metadata
parentsync (diff)
downloadapache2-67a3a718776eaab2699f55e61a3472af04a7b751.tar.xz
apache2-67a3a718776eaab2699f55e61a3472af04a7b751.zip
Fold in the CAN-2003-0542 regex patch.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/metadata')
-rw-r--r--modules/metadata/mod_setenvif.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/metadata/mod_setenvif.c b/modules/metadata/mod_setenvif.c
index 6b2d033967..5a1268eb0f 100644
--- a/modules/metadata/mod_setenvif.c
+++ b/modules/metadata/mod_setenvif.c
@@ -489,7 +489,7 @@ static int match_headers(request_rec *r)
apr_size_t val_len = 0;
int i, j;
char *last_name;
- regmatch_t regm[10];
+ regmatch_t regm[AP_MAX_REG_MATCH];
if (!ap_get_module_config(r->request_config, &setenvif_module)) {
ap_set_module_config(r->request_config, &setenvif_module,
@@ -577,8 +577,8 @@ static int match_headers(request_rec *r)
}
if ((b->pattern && apr_strmatch(b->pattern, val, val_len)) ||
- (!b->pattern && !ap_regexec(b->preg, val, b->preg->re_nsub + 1,
- regm, 0))) {
+ (!b->pattern && !ap_regexec(b->preg, val, AP_MAX_REG_MATCH, regm,
+ 0))) {
const apr_array_header_t *arr = apr_table_elts(b->features);
elts = (const apr_table_entry_t *) arr->elts;
@@ -589,7 +589,7 @@ static int match_headers(request_rec *r)
else {
if (!b->pattern) {
char *replaced = ap_pregsub(r->pool, elts[j].val, val,
- b->preg->re_nsub + 1, regm);
+ AP_MAX_REG_MATCH, regm);
if (replaced) {
apr_table_setn(r->subprocess_env, elts[j].key,
replaced);