1
1
mirror of https://github.com/openresty/headers-more-nginx-module synced 2024-11-11 20:35:56 +01:00

bugfix: nginx crash when accessing uninitialized pointer.

This commit is contained in:
lijunlong 2022-07-07 14:05:19 +08:00
parent 91eb0db9ef
commit d502e41996
3 changed files with 9 additions and 1 deletions

@ -23,7 +23,7 @@ env:
matrix:
- NGINX_VERSION=1.19.3
- NGINX_VERSION=1.19.9
- NGINX_VERSION=1.23.0
- NGINX_VERSION=1.23.0 WITHOUT_PCRE2=1
before_install:
- sudo apt-get update -y

@ -335,6 +335,9 @@ matched:
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) {

@ -6,6 +6,10 @@ root=`pwd`
version=$1
home=~
force=$2
pcre2_opt=""
if [ "$WITHOUT_PCRE2" = "1" ]; then
pcre2_opt="--without-pcre2"
fi
#--with-cc=gcc46 \
@ -21,6 +25,7 @@ ngx-build $force $version \
--without-http_autoindex_module \
--without-http_auth_basic_module \
--without-http_userid_module \
$pcre2_opt \
--with-http_realip_module \
--with-http_dav_module \
--add-module=$root/../eval-nginx-module \