diff options
author | Sergey Kandaurov <pluknet@nginx.com> | 2017-05-18 14:17:00 +0300 |
---|---|---|
committer | Sergey Kandaurov <pluknet@nginx.com> | 2017-05-18 14:17:00 +0300 |
commit | 9359155b2fb443ac3c2cf0d897d5db668585235b (patch) | |
tree | 3fb886f452f0c5db7e71b1a245653b8ca9016ecd /src/http/modules/ngx_http_proxy_module.c | |
parent | 84fdff7930986b436dfeea21134cee598b129d97 (diff) | |
download | nginx-9359155b2fb443ac3c2cf0d897d5db668585235b.tar.gz nginx-9359155b2fb443ac3c2cf0d897d5db668585235b.zip |
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.
Diffstat (limited to 'src/http/modules/ngx_http_proxy_module.c')
-rw-r--r-- | src/http/modules/ngx_http_proxy_module.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_proxy_module.c b/src/http/modules/ngx_http_proxy_module.c index 0fee2c2c4..839d479ea 100644 --- a/src/http/modules/ngx_http_proxy_module.c +++ b/src/http/modules/ngx_http_proxy_module.c @@ -1798,6 +1798,7 @@ ngx_http_proxy_process_header(ngx_http_request_t *r) h->key.data = ngx_pnalloc(r->pool, h->key.len + 1 + h->value.len + 1 + h->key.len); if (h->key.data == NULL) { + h->hash = 0; return NGX_ERROR; } |