Mercurial > hg > nginx-vendor-current
comparison src/http/ngx_http_core_module.c @ 670:ad45b044f1e5 NGINX_1_1_19
nginx 1.1.19
*) Security: specially crafted mp4 file might allow to overwrite memory
locations in a worker process if the ngx_http_mp4_module was used,
potentially resulting in arbitrary code execution (CVE-2012-2089).
Thanks to Matthew Daley.
*) Bugfix: nginx/Windows might be terminated abnormally.
Thanks to Vincent Lee.
*) Bugfix: nginx hogged CPU if all servers in an upstream were marked as
"backup".
*) Bugfix: the "allow" and "deny" directives might be inherited
incorrectly if they were used with IPv6 addresses.
*) Bugfix: the "modern_browser" and "ancient_browser" directives might
be inherited incorrectly.
*) Bugfix: timeouts might be handled incorrectly on Solaris/SPARC.
*) Bugfix: in the ngx_http_mp4_module.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 12 Apr 2012 00:00:00 +0400 |
parents | 9fbf3ad94cbf |
children | f41d4b305d22 |
comparison
equal
deleted
inserted
replaced
669:3f5d0be5ee74 | 670:ad45b044f1e5 |
---|---|
1226 | 1226 |
1227 } else { | 1227 } else { |
1228 len = tf->name.len; | 1228 len = tf->name.len; |
1229 } | 1229 } |
1230 | 1230 |
1231 /* 16 bytes are preallocation */ | 1231 if (!alias) { |
1232 reserve = ngx_abs((ssize_t) (len - r->uri.len)) + alias + 16; | 1232 reserve = len > r->uri.len ? len - r->uri.len : 0; |
1233 | |
1234 #if (NGX_PCRE) | |
1235 } else if (clcf->regex) { | |
1236 reserve = len; | |
1237 #endif | |
1238 | |
1239 } else { | |
1240 reserve = len > r->uri.len - alias ? len - (r->uri.len - alias) : 0; | |
1241 } | |
1233 | 1242 |
1234 if (reserve > allocated) { | 1243 if (reserve > allocated) { |
1235 | 1244 |
1236 /* we just need to allocate path and to copy a root */ | 1245 /* 16 bytes are preallocation */ |
1237 | 1246 allocated = reserve + 16; |
1238 if (ngx_http_map_uri_to_path(r, &path, &root, reserve) == NULL) { | 1247 |
1248 if (ngx_http_map_uri_to_path(r, &path, &root, allocated) == NULL) { | |
1239 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); | 1249 ngx_http_finalize_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); |
1240 return NGX_OK; | 1250 return NGX_OK; |
1241 } | 1251 } |
1242 | 1252 |
1243 name = path.data + root; | 1253 name = path.data + root; |
1244 allocated = path.len - root - (r->uri.len - alias); | |
1245 } | 1254 } |
1246 | 1255 |
1247 if (tf->values == NULL) { | 1256 if (tf->values == NULL) { |
1248 | 1257 |
1249 /* tf->name.len includes the terminating '\0' */ | 1258 /* tf->name.len includes the terminating '\0' */ |