Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
heikojansen authored and davidjb committed Dec 1, 2022
1 parent 932eccf commit 99d72dc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ngx_http_shibboleth_module.c
Expand Up @@ -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->value = *value;
#if defined(nginx_version) && nginx_version >= 1023000
h->next = NULL;
#endif

h->lowcase_key = ngx_pnalloc(r->pool, h->key.len);
if (h->lowcase_key == NULL) {
Expand Down

0 comments on commit 99d72dc

Please sign in to comment.