Klaus Demo nginx / 000609a
fix segfaults introduced in r2549 and r2550 Igor Sysoev 13 years ago
2 changed file(s) with 6 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
13791379
13801380 if ((*clcfp)->captures && r->captures == NULL) {
13811381
1382 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int);
1383
1384 r->captures = ngx_palloc(r->pool, len);
1382 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3;
1383
1384 r->captures = ngx_palloc(r->pool, len * sizeof(int));
13851385 if (r->captures == NULL) {
13861386 return NGX_ERROR;
13871387 }
16611661
16621662 if (sn[i].captures && r->captures == NULL) {
16631663
1664 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int);
1665
1666 r->captures = ngx_palloc(r->pool, ncaptures);
1664 ncaptures = (NGX_HTTP_MAX_CAPTURES + 1) * 3;
1665
1666 r->captures = ngx_palloc(r->pool, ncaptures * sizeof(int));
16671667 if (r->captures == NULL) {
16681668 return NGX_ERROR;
16691669 }