Add connection ID length checks
These changes only impact behavior for versions that support variable length connection IDs, and all of those versions are disabled by flags, so we don't need extra flag protection.
gfe-relnote: add connection ID length checks, protected by disabled quic_enable_v47 flag
PiperOrigin-RevId: 261237221
Change-Id: I89e7bec58644b7ec18e3c7ce3ecbd6d93c9c0fc3
diff --git a/quic/core/quic_connection_id.h b/quic/core/quic_connection_id.h
index 6b1b0bc..f1861e0 100644
--- a/quic/core/quic_connection_id.h
+++ b/quic/core/quic_connection_id.h
@@ -25,7 +25,7 @@
CONNECTION_ID_ABSENT = 2,
};
-// Connection IDs can be 0-18 bytes per IETF specifications.
+// Maximum connection ID length that we support in any packet or version.
const uint8_t kQuicMaxConnectionIdLength = 18;
// kQuicDefaultConnectionIdLength is the only supported length for QUIC