Mercurial > hg > nginx-quic
diff src/http/ngx_http_request.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 | 0cf6662e4448 |
children | a7443674e429 |
line wrap: on
line diff
--- a/src/http/ngx_http_request.c +++ b/src/http/ngx_http_request.c @@ -1662,9 +1662,9 @@ ngx_http_find_virtual_server(ngx_http_re if (sn[i].captures && r->captures == NULL) { - ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); - - r->captures = ngx_palloc(r->pool, ncaptures); + ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3; + + r->captures = ngx_palloc(r->pool, ncaptures * sizeof(int)); if (r->captures == NULL) { return NGX_ERROR; }