Skip to content

Commit 99d72dc

Browse files
heikojansendavidjb
authored andcommitted
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.
1 parent 932eccf commit 99d72dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ngx_http_shibboleth_module.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,9 @@ ngx_http_set_header_helper(ngx_http_request_t *r, ngx_http_shib_request_header_v
763763

764764
h->key = hv->key;
765765
h->value = *value;
766+
#if defined(nginx_version) && nginx_version >= 1023000
767+
h->next = NULL;
768+
#endif
766769

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

0 commit comments

Comments
 (0)