comparison src/http/modules/ngx_http_uwsgi_module.c @ 7001:08537eab4f23

Upstream: fixed u->headers_in.headers allocation error handling. Previously, an allocation error resulted in uninitialized memory access when evaluating $upstream_http_ variables. On a related note, see r->headers_out.headers cleanup work in 0cdee26605f3.
author Sergey Kandaurov <pluknet@nginx.com>
date Thu, 18 May 2017 14:17:00 +0300
parents 08dc60979133
children f684178faec9
comparison
equal deleted inserted replaced
7000:d8e8ced78e77 7001:08537eab4f23
1242 1242
1243 h->key.data = ngx_pnalloc(r->pool, 1243 h->key.data = ngx_pnalloc(r->pool,
1244 h->key.len + 1 + h->value.len + 1 1244 h->key.len + 1 + h->value.len + 1
1245 + h->key.len); 1245 + h->key.len);
1246 if (h->key.data == NULL) { 1246 if (h->key.data == NULL) {
1247 h->hash = 0;
1247 return NGX_ERROR; 1248 return NGX_ERROR;
1248 } 1249 }
1249 1250
1250 h->value.data = h->key.data + h->key.len + 1; 1251 h->value.data = h->key.data + h->key.len + 1;
1251 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; 1252 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;