]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h3: report frames bigger than rx buffer
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Feb 2022 15:59:39 +0000 (16:59 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Feb 2022 16:11:59 +0000 (17:11 +0100)
If a frame is bigger than the qcs buffer, it can not be parsed at the
moment. Add a TODO comment to signal that a fix is required.

src/h3.c

index b6df4304541cd15e04a12470f7e4d87033ede277..e3ee84694b0b99d6d4ec72aee845c19397f0fc1a 100644 (file)
--- a/src/h3.c
+++ b/src/h3.c
@@ -126,9 +126,12 @@ static int h3_decode_qcs(struct qcs *qcs, int fin, void *ctx)
 
                h3_debug_printf(stderr, "%s: ftype: %llu, flen: %llu\n", __func__,
                        (unsigned long long)ftype, (unsigned long long)flen);
-               if (flen > b_data(&b))
+               if (flen > b_data(&b) && !b_full(rxbuf))
                        break;
 
+               /* TODO handle full rxbuf */
+               BUG_ON(flen > b_size(rxbuf));
+
                b_del(rxbuf, hlen);
                last_stream_frame = (fin && flen == b_data(rxbuf));