From 49f0b0d99d70fa4e895b939a320c29df28a34fff Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Tue, 17 Nov 2020 21:12:36 +0000 Subject: [PATCH] HTTP/3: finalize chunked response body chain with NULL. Unfinalized chain could result in segfault. The problem was introduced in ef83990f0e25. Patch by Andrey Kolyshkin. --- src/http/modules/ngx_http_chunked_filter_module.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/http/modules/ngx_http_chunked_filter_module.c b/src/http/modules/ngx_http_chunked_filter_module.c index 371559e2f..138369815 100644 --- a/src/http/modules/ngx_http_chunked_filter_module.c +++ b/src/http/modules/ngx_http_chunked_filter_module.c @@ -216,6 +216,9 @@ ngx_http_chunked_body_filter(ngx_http_request_t *r, ngx_chain_t *in) cl->buf->last_buf = 0; *ll = tl; + + } else { + *ll = NULL; } } else