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_data_writer_test.cc b/quic/core/quic_data_writer_test.cc
index 727c813..352f27c 100644
--- a/quic/core/quic_data_writer_test.cc
+++ b/quic/core/quic_data_writer_test.cc
@@ -1149,11 +1149,11 @@
 }
 
 TEST_P(QuicDataWriterTest, InvalidConnectionIdLengthRead) {
-  static const uint8_t bad_connection_id_length = 19;
+  static const uint8_t bad_connection_id_length = 200;
   static_assert(bad_connection_id_length > kQuicMaxConnectionIdLength,
                 "bad lengths");
-  char buffer[20] = {};
-  QuicDataReader reader(buffer, 20);
+  char buffer[255] = {};
+  QuicDataReader reader(buffer, sizeof(buffer));
   QuicConnectionId connection_id;
   bool ok;
   EXPECT_QUIC_BUG(