From: Vladimír Čunát Date: Fri, 24 Jul 2026 08:48:20 +0000 (+0200) Subject: daemon/quic nit: restrict length of cid X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2ac2b04f42187c8de4eabb2c8ea1ebbe427f4d2;p=thirdparty%2Fknot-resolver.git daemon/quic nit: restrict length of cid The ngtcp2_cid_init() docs say that we must not pass more. Fortunately, these cases were unreachable from current code. scan.coverity.com noticed this with ID 651670 --- diff --git a/daemon/quic_common.c b/daemon/quic_common.c index 549ce80a5..8588506b1 100644 --- a/daemon/quic_common.c +++ b/daemon/quic_common.c @@ -159,7 +159,7 @@ int init_random_cid(ngtcp2_cid *cid, size_t len) if (len == 0) len = SERVER_DEFAULT_SCIDLEN; - uint8_t buf[32]; + uint8_t buf[NGTCP2_MAX_CIDLEN]; if (len > sizeof(buf)) { len = sizeof(buf); }