comparison src/http/modules/ngx_http_proxy_module.c @ 666:bf8b55a5ac89 NGINX_1_1_17

nginx 1.1.17 *) Security: content of previously freed memory might be sent to a client if backend returned specially crafted response. Thanks to Matthew Daley. *) Bugfix: in the embedded perl module if used from SSI. Thanks to Matthew Daley. *) Bugfix: in the ngx_http_uwsgi_module.
author Igor Sysoev <http://sysoev.ru>
date Thu, 15 Mar 2012 00:00:00 +0400
parents f5b859b2f097
children f41d4b305d22
comparison
equal deleted inserted replaced
665:a8821023989f 666:bf8b55a5ac89
1379 } 1379 }
1380 1380
1381 h->value.data = h->key.data + h->key.len + 1; 1381 h->value.data = h->key.data + h->key.len + 1;
1382 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; 1382 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;
1383 1383
1384 ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1); 1384 ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
1385 ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1); 1385 h->key.data[h->key.len] = '\0';
1386 ngx_memcpy(h->value.data, r->header_start, h->value.len);
1387 h->value.data[h->value.len] = '\0';
1386 1388
1387 if (h->key.len == r->lowcase_index) { 1389 if (h->key.len == r->lowcase_index) {
1388 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); 1390 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
1389 1391
1390 } else { 1392 } else {