Limit the amount of incoming crypto data that will be buffered.

gfe-relnote: protected by disabled flag-protected QUIC_VERSION_48
PiperOrigin-RevId: 266019141
Change-Id: Ife996bdf80a28b3bcce4b02cda49bff0fd23a071
diff --git a/quic/core/quic_crypto_handshaker.cc b/quic/core/quic_crypto_handshaker.cc
index fa0f78a..d608ead 100644
--- a/quic/core/quic_crypto_handshaker.cc
+++ b/quic/core/quic_crypto_handshaker.cc
@@ -45,5 +45,9 @@
   return &crypto_framer_;
 }
 
+size_t QuicCryptoHandshaker::BufferSizeLimitForLevel(EncryptionLevel) const {
+  return GetQuicFlag(FLAGS_quic_max_buffered_crypto_bytes);
+}
+
 #undef ENDPOINT  // undef for jumbo builds
 }  // namespace quic