Improve gfe_quic_fuzzer:
Add more seeds to gfe_quic_fuzzer corpus.
Fix proto_to_packet_translator code which hits CHECK or GFE_BUG.
Make DCHECK and GFE_BUG not to abort during proto tranlation.
PiperOrigin-RevId: 388463046
diff --git a/quic/test_tools/quic_test_utils.cc b/quic/test_tools/quic_test_utils.cc
index 8081c36..126b87e 100644
--- a/quic/test_tools/quic_test_utils.cc
+++ b/quic/test_tools/quic_test_utils.cc
@@ -191,7 +191,11 @@
EncryptionLevel level = HeaderToEncryptionLevel(header);
size_t length =
framer->BuildDataPacket(header, frames, buffer, packet_size, level);
- QUICHE_DCHECK_NE(0u, length);
+
+ if (length == 0) {
+ delete[] buffer;
+ return nullptr;
+ }
// Re-construct the data packet with data ownership.
return std::make_unique<QuicPacket>(
buffer, length, /* owns_buffer */ true,