Mercurial > hg > nginx
comparison src/http/ngx_http_core_module.c @ 7027:6d0e0d982ec0
Fixed segfault in try_files with nested location.
If memory allocation of a new r->uri.data storage failed, reset its length as
well. Request URI is used in ngx_http_finalize_request() for debug logging.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Wed, 07 Jun 2017 18:46:35 +0300 |
parents | 9552758a786e |
children | 1b068a4e82d8 |
comparison
equal
deleted
inserted
replaced
7026:e699e6b6d76c | 7027:6d0e0d982ec0 |
---|---|
1351 name = r->uri.data; | 1351 name = r->uri.data; |
1352 | 1352 |
1353 r->uri.len = alias + path.len; | 1353 r->uri.len = alias + path.len; |
1354 r->uri.data = ngx_pnalloc(r->pool, r->uri.len); | 1354 r->uri.data = ngx_pnalloc(r->pool, r->uri.len); |
1355 if (r->uri.data == NULL) { | 1355 if (r->uri.data == NULL) { |
1356 r->uri.len = 0; | |
1356 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 1357 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
1357 return NGX_OK; | 1358 return NGX_OK; |
1358 } | 1359 } |
1359 | 1360 |
1360 p = ngx_copy(r->uri.data, name, alias); | 1361 p = ngx_copy(r->uri.data, name, alias); |