Mercurial > hg > nginx-quic
diff src/http/ngx_http_core_module.c @ 2556:8ec97ff12a0a
fix segfaults introduced in r2549 and r2550
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 11 Mar 2009 13:04:02 +0000 |
parents | 2d34fba7cf06 |
children | c352c419be85 |
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c +++ b/src/http/ngx_http_core_module.c @@ -1380,9 +1380,9 @@ ngx_http_core_find_location(ngx_http_req if ((*clcfp)->captures && r->captures == NULL) { - len = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); - - r->captures = ngx_palloc(r->pool, len); + len = (NGX_HTTP_MAX_CAPTURES + 1) * 3; + + r->captures = ngx_palloc(r->pool, len * sizeof(int)); if (r->captures == NULL) { return NGX_ERROR; }