]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: quic: Possible frame parsers array overrun
authorFrédéric Lécaille <flecaille@haproxy.com>
Tue, 15 Feb 2022 09:27:34 +0000 (10:27 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Tue, 15 Feb 2022 16:33:21 +0000 (17:33 +0100)
This should fix CID 1469663 for GH #1546.

src/quic_frame.c

index 721b5e02dfb6fc3f588b3c2df502bfce709c2e76..0adce4c1f79b86bff9a862038c680d1525a0f39a 100644 (file)
@@ -1094,7 +1094,7 @@ int qc_parse_frm(struct quic_frame *frm, struct quic_rx_packet *pkt,
        }
 
        frm->type = *(*buf)++;
-       if (frm->type > QUIC_FT_MAX) {
+       if (frm->type >= QUIC_FT_MAX) {
                TRACE_DEVEL("wrong frame type", QUIC_EV_CONN_PRSFRM, qc, frm);
                return 0;
        }