comparison src/http/modules/ngx_http_scgi_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 d0f7a625f27c
children f41d4b305d22
comparison
equal deleted inserted replaced
665:a8821023989f 666:bf8b55a5ac89
939 } 939 }
940 940
941 h->value.data = h->key.data + h->key.len + 1; 941 h->value.data = h->key.data + h->key.len + 1;
942 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; 942 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;
943 943
944 ngx_cpystrn(h->key.data, r->header_name_start, h->key.len + 1); 944 ngx_memcpy(h->key.data, r->header_name_start, h->key.len);
945 ngx_cpystrn(h->value.data, r->header_start, h->value.len + 1); 945 h->key.data[h->key.len] = '\0';
946 ngx_memcpy(h->value.data, r->header_start, h->value.len);
947 h->value.data[h->value.len] = '\0';
946 948
947 if (h->key.len == r->lowcase_index) { 949 if (h->key.len == r->lowcase_index) {
948 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len); 950 ngx_memcpy(h->lowcase_key, r->lowcase_header, h->key.len);
949 951
950 } else { 952 } else {
1382 if (conf->params_source == NULL) { 1384 if (conf->params_source == NULL) {
1383 conf->params_source = prev->params_source; 1385 conf->params_source = prev->params_source;
1384 1386
1385 if (prev->headers_hash.buckets 1387 if (prev->headers_hash.buckets
1386 #if (NGX_HTTP_CACHE) 1388 #if (NGX_HTTP_CACHE)
1387 && ((conf->upstream.cache == NULL) == (prev->upstream.cache == NULL)) 1389 && ((conf->upstream.cache == NULL)
1390 == (prev->upstream.cache == NULL))
1388 #endif 1391 #endif
1389 ) 1392 )
1390 { 1393 {
1391 conf->flushes = prev->flushes; 1394 conf->flushes = prev->flushes;
1392 conf->params_len = prev->params_len; 1395 conf->params_len = prev->params_len;