diff options
author | NGINX team <nginx@nginx.org> | 2012-03-15 12:18:04 +0000 |
---|---|---|
committer | Jon Kolb <jon@b0g.us> | 2012-03-15 12:18:04 +0000 |
commit | fc2138af6a178a6ae68b2f35bfaf7017412954d4 (patch) | |
tree | ee4796f31a25a4ad38dcc0daaddf499df725a1e3 /src/http/modules/ngx_http_uwsgi_module.c | |
parent | 516a27f60fbb43ad2ea44fce08c0925650843740 (diff) | |
download | nginx-fc2138af6a178a6ae68b2f35bfaf7017412954d4.tar.gz |
Changes with nginx 1.0.14 15 Mar 2012v1.0.14
*) Security: content of previously freed memory might be sent to a
client if backend returned specially crafted response.
Thanks to Matthew Daley.
Diffstat (limited to 'src/http/modules/ngx_http_uwsgi_module.c')
-rw-r--r-- | src/http/modules/ngx_http_uwsgi_module.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_uwsgi_module.c b/src/http/modules/ngx_http_uwsgi_module.c index 367388e63..fb5ff0d78 100644 --- a/src/http/modules/ngx_http_uwsgi_module.c +++ b/src/http/modules/ngx_http_uwsgi_module.c @@ -947,8 +947,10 @@ ngx_http_uwsgi_process_header(ngx_http_request_t *r) h->value.data = h->key.data + h->key.len + 1; h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; - ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1); - ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1); + ngx_memcpy(h->key.data, r->header_name_start, h->key.len); + h->key.data[h->key.len] = '\0'; + ngx_memcpy(h->value.data, r->header_start, h->value.len); + h->value.data[h->value.len] = '\0'; if (h->key.len == r->lowcase_index) { ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); |