Mercurial > hg > nginx-vendor-1-0
comparison src/http/ngx_http_core_module.c @ 458:2e2b57743e87 NGINX_0_7_41
nginx 0.7.41
*) Bugfix: a segmentation fault might occur in worker process, if a
"server_name" or a "location" directives had captures in regular
expressions; the issue had appeared in 0.7.40.
Thanks to Vladimir Sopot.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Wed, 11 Mar 2009 00:00:00 +0300 |
parents | ca8f7f6cab16 |
children | bb941a2996a6 |
comparison
equal
deleted
inserted
replaced
457:cc8fb8cd98bb | 458:2e2b57743e87 |
---|---|
1378 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, | 1378 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, |
1379 "test location: ~ \"%V\"", &(*clcfp)->name); | 1379 "test location: ~ \"%V\"", &(*clcfp)->name); |
1380 | 1380 |
1381 if ((*clcfp)->captures && r->captures == NULL) { | 1381 if ((*clcfp)->captures && r->captures == NULL) { |
1382 | 1382 |
1383 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3 * sizeof(int); | 1383 len = (NGX_HTTP_MAX_CAPTURES + 1) * 3; |
1384 | 1384 |
1385 r->captures = ngx_palloc(r->pool, len); | 1385 r->captures = ngx_palloc(r->pool, len * sizeof(int)); |
1386 if (r->captures == NULL) { | 1386 if (r->captures == NULL) { |
1387 return NGX_ERROR; | 1387 return NGX_ERROR; |
1388 } | 1388 } |
1389 } | 1389 } |
1390 | 1390 |