From: Frédéric Lécaille Date: Wed, 2 Feb 2022 09:44:36 +0000 (+0100) Subject: MINOR: quic: Remove a useless test in quic_get_dgram_dcid() X-Git-Tag: v2.6-dev2~199 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bfa3236c6c3550eb3f53f3fb98738aaabe77c689;p=thirdparty%2Fhaproxy.git MINOR: quic: Remove a useless test in quic_get_dgram_dcid() This test is already done when entering quic_get_dgram_dcid(). --- diff --git a/src/xprt_quic.c b/src/xprt_quic.c index 0f9987e026..23126e7beb 100644 --- a/src/xprt_quic.c +++ b/src/xprt_quic.c @@ -5429,7 +5429,7 @@ static int quic_get_dgram_dcid(unsigned char *buf, const unsigned char *end, minlen = long_header ? QUIC_LONG_PACKET_MINLEN : QUIC_SHORT_PACKET_MINLEN + QUIC_HAP_CID_LEN; skip = long_header ? QUIC_LONG_PACKET_DCID_OFF : QUIC_SHORT_PACKET_DCID_OFF; - if (end - buf <= minlen || !(*buf & QUIC_PACKET_FIXED_BIT)) + if (end - buf <= minlen) goto err; buf += skip;