aboutsummaryrefslogtreecommitdiff
path: root/src/http/ngx_http_variables.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-11-16 19:11:38 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-11-16 19:11:38 +0000
commit42f5fb19ace6d56d5d49094adca3c1c983b51fa9 (patch)
tree49333b0ed4c882f5cbe46104bab932c0cf3ee5b6 /src/http/ngx_http_variables.c
parentd86a0bfed491fbaf75d2268856aa999621b7cdf0 (diff)
downloadnginx-42f5fb19ace6d56d5d49094adca3c1c983b51fa9.tar.gz
nginx-42f5fb19ace6d56d5d49094adca3c1c983b51fa9.zip
evaluate maximum captures size on configuration phase
Diffstat (limited to 'src/http/ngx_http_variables.c')
-rw-r--r--src/http/ngx_http_variables.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/http/ngx_http_variables.c b/src/http/ngx_http_variables.c
index 0289a64ac..a2852b0dd 100644
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1759,7 +1759,7 @@ ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re, ngx_str_t *s)
cmcf = ngx_http_get_module_main_conf(r, ngx_http_core_module);
if (re->ncaptures) {
- len = (cmcf->ncaptures + 1) * 3;
+ len = cmcf->ncaptures;
if (r->captures == NULL) {
r->captures = ngx_palloc(r->pool, len * sizeof(int));