Skip to content
Snippets Groups Projects
Commit 99d72dc8 authored by Heiko Jansen's avatar Heiko Jansen Committed by David Beitey
Browse files

bugfix: nginx crash when accessing uninitialized pointer

This copies code contributed to ngx_headers_more by @zhuizhuhaomeng
in openresty/headers-more-nginx-module@d502e41

I omitted the PCRE2-related build flag added in that same commit because
I do not understand the reason for that.
parent 932eccff
No related branches found
No related tags found
No related merge requests found
...@@ -763,6 +763,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_shib_request_header_v ...@@ -763,6 +763,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_shib_request_header_v
h->key = hv->key; h->key = hv->key;
h->value = *value; h->value = *value;
#if defined(nginx_version) && nginx_version >= 1023000
h->next = NULL;
#endif
h->lowcase_key = ngx_pnalloc(r->pool, h->key.len); h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
if (h->lowcase_key == NULL) { if (h->lowcase_key == NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment