comparison src/http/modules/ngx_http_uwsgi_module.c @ 648:fa9b9e42035e NGINX_1_0_14

nginx 1.0.14 *) Security: content of previously freed memory might be sent to a client if backend returned specially crafted response. Thanks to Matthew Daley.
author Igor Sysoev <http://sysoev.ru>
date Thu, 15 Mar 2012 00:00:00 +0400
parents ad25218fd14b
children
comparison
equal deleted inserted replaced
647:db509e2f8037 648:fa9b9e42035e
945 } 945 }
946 946
947 h->value.data = h->key.data + h->key.len + 1; 947 h->value.data = h->key.data + h->key.len + 1;
948 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; 948 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;
949 949
950 ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1); 950 ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
951 ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1); 951 h->key.data[h->key.len] = '\0';
952 ngx_memcpy(h->value.data, r->header_start, h->value.len);
953 h->value.data[h->value.len] = '\0';
952 954
953 if (h->key.len == r->lowcase_index) { 955 if (h->key.len == r->lowcase_index) {
954 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); 956 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
955 957
956 } else { 958 } else {