From 08ecbea28a938697adaf0c4e6bd34973c8cc9157 Mon Sep 17 00:00:00 2001 From: Eric Covener Date: Thu, 27 Aug 2026 17:33:53 +0000 Subject: [PATCH] mod_proxy_http2: reserve NUL when rewriting a backend Link header uri Submitted by: arshiya tabasum Github: closes #711 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1937528 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http2/h2_proxy_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/http2/h2_proxy_util.c b/modules/http2/h2_proxy_util.c index ea9da14ee8..b7a4c50910 100644 --- a/modules/http2/h2_proxy_util.c +++ b/modules/http2/h2_proxy_util.c @@ -976,7 +976,7 @@ static void map_link(link_ctx *ctx) * to work, we need to use the proxy uri */ int path_start = ctx->link_start + ctx->rbu_len; link_len -= ctx->rbu_len; - need_len = ctx->psu_len + link_len; + need_len = ctx->psu_len + link_len + 1; if (need_len > sizeof(buffer)) goto out; memcpy(buffer, ctx->p_server_uri, ctx->psu_len);