]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: quic: Missing incrementation in NEW_TOKEN frame builder
authorFrederic Lecaille <flecaille@haproxy.com>
Fri, 30 Aug 2024 12:25:26 +0000 (14:25 +0200)
committerFrederic Lecaille <flecaille@haproxy.com>
Fri, 30 Aug 2024 15:04:09 +0000 (17:04 +0200)
quic_build_new_token_frame() is the function which is called to build
a NEW_TOKEN frame into a buffer. The position pointer for this buffer
was not updated, leading the NEW_TOKEN frame to be malformed.

Must be backported as far as 2.6.

src/quic_frame.c

index 41309dbfe867fdaf844eaac7f91664d2214c6500..8d42786e0f8266df69f14511208549ec66dde2e8 100644 (file)
@@ -485,6 +485,7 @@ static int quic_build_new_token_frame(unsigned char **pos, const unsigned char *
                return 0;
 
        memcpy(*pos, new_token_frm->data, new_token_frm->len);
+       *pos += new_token_frm->len;
 
        return 1;
 }