]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: h1-htx: Don't forget to init flags in h1_format_htx_msg function
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 10 Jul 2025 12:10:41 +0000 (14:10 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 10 Jul 2025 12:10:42 +0000 (14:10 +0200)
The regression was introduced by commit 187ae28 ("MINOR: h1-htx: Add
function to format an HTX message in its H1 representation"). We must be
sure the flags variable must be initialized in h1_format_htx_msg() function.

This patch must be backported with the commit above.

src/h1_htx.c

index 142d9919973e1f35bea38da9702a14c638721cf1..83e241e5379939086c8494ff48fbbcbf2e9166f9 100644 (file)
@@ -1127,7 +1127,7 @@ int h1_format_htx_msg(const struct htx *htx, struct buffer *outbuf)
         const struct htx_blk *blk;
        struct ist n, v;
        enum htx_blk_type type;
-       uint32_t flags;
+       uint32_t flags = 0;
        int has_eod = 0;
 
        if (b_data(outbuf))