comparison src/http/modules/ngx_http_scgi_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 fa56ab75cffc
children f684178faec9
comparison
equal deleted inserted replaced
7000:d8e8ced78e77 7001:08537eab4f23
1038 1038
1039 h->key.data = ngx_pnalloc(r->pool, 1039 h->key.data = ngx_pnalloc(r->pool,
1040 h->key.len + 1 + h->value.len + 1 1040 h->key.len + 1 + h->value.len + 1
1041 + h->key.len); 1041 + h->key.len);
1042 if (h->key.data == NULL) { 1042 if (h->key.data == NULL) {
1043 h->hash = 0;
1043 return NGX_ERROR; 1044 return NGX_ERROR;
1044 } 1045 }
1045 1046
1046 h->value.data = h->key.data + h->key.len + 1; 1047 h->value.data = h->key.data + h->key.len + 1;
1047 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1; 1048 h->lowcase_key = h->key.data + h->key.len + 1 + h->value.len + 1;