BUG/MINOR: h3: fix frame demuxing
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 May 2022 09:44:52 +0000 (11:44 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 31 May 2022 12:43:14 +0000 (14:43 +0200)
commit88d5dd1a6f4c48db667c3cc7de8dd5110af5409d
tree0f3fb81f2793efbad211b67ba05e176f8bb272e7
parent1194db24bc05e202e5ee83292880c040a9053b06
BUG/MINOR: h3: fix frame demuxing

The H3 demuxing code was not fully correct. After parsing the H3 frame
header, the check between frame length and buffer data is wrong as we
compare a copy of the buffer made before the H3 header removal.

Fix this by improving the H3 demuxing code API. h3_decode_frm_header()
now uses a ncbuf instance, this prevents an unnecessary cast
ncbuf/buffer in h3_decode_qcs() which resolves this error.

This bug was not triggered at this moment. Its impact should be really
limited.
src/h3.c