From cf1eba61185e79f4a8e46c35767bd016bd30f313 Mon Sep 17 00:00:00 2001 From: kingluo Date: Thu, 27 Oct 2022 22:24:18 +0800 Subject: [PATCH] bugfix: clear tag in ngx_buf_t to avoid double free --- patches/nginx-1.21.4-clear_ngx_buf_tag.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/nginx-1.21.4-clear_ngx_buf_tag.patch diff --git a/patches/nginx-1.21.4-clear_ngx_buf_tag.patch b/patches/nginx-1.21.4-clear_ngx_buf_tag.patch new file mode 100644 index 0000000..74b0ecd --- /dev/null +++ b/patches/nginx-1.21.4-clear_ngx_buf_tag.patch @@ -0,0 +1,11 @@ +diff -aNur nginx-1.21.4/src/core/ngx_buf.c nginx-1.21.4-patched/src/core/ngx_buf.c +--- nginx-1.21.4/src/core/ngx_buf.c 2021-11-05 13:06:14.000000000 +0800 ++++ nginx-1.21.4-patched/src/core/ngx_buf.c 2022-10-27 21:45:48.943152558 +0800 +@@ -213,6 +213,8 @@ + break; + } + ++ cl->buf->tag = 0; ++ + cl->buf->pos = cl->buf->start; + cl->buf->last = cl->buf->start;