]> git.kaiwu.me - haproxy.git/commitdiff
BUG/MINOR: h3: always initialize <hdng_prf> to remove any ambiguity
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 2 Dec 2026 15:19:32 +0000 (16:19 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 3 Dec 2026 10:49:20 +0000 (11:49 +0100)
This patch ensures that the h3c connection member <hdng_prf> is always
initialized to NULL.

This is similar to the previous patch which dealt with the
<prx_counters> member: the current code is ambiguous for a backend
connection whose target could be either a server or a proxy instance.
This is no longer possible since the removal of dispatch and option
transparent modes, but the NULL initialization is kept as a defensive
measure.

This should be backported up to 3.5.

src/h3.c

index 3cc5a0b020bc222da63813d6500c5c83270fa492..35785db643ee724a36d901ffb43cc483cf1c9f4e 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -3903,6 +3903,7 @@ static int h3_init(struct qcc *qcc)
        h3c->flags = 0;
        h3c->id_shut_l = 0;
        h3c->id_shut_r = 0;
+       h3c->hdng_prf = NULL;
 
        qcc->ctx = h3c;
        h3c->prx_counters = qc_counters(qcc->conn->target, &h3_stats_module);