Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1497)

Unified Diff: net/quic/quic_packet_generator.cc

Issue 1246793002: relnote: Protect against a QUIC crash bug but logging a DFATAL and (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_packet_generator.cc
diff --git a/net/quic/quic_packet_generator.cc b/net/quic/quic_packet_generator.cc
index 49cdc7f6cad43c427b7a70d60e65a2c6653a5e96..cc3a79331a1af98a0be4c85ed3b00aeb69398846 100644
--- a/net/quic/quic_packet_generator.cc
+++ b/net/quic/quic_packet_generator.cc
@@ -457,7 +457,12 @@ void QuicPacketGenerator::SerializeAndSendPacket() {
char buffer[kMaxPacketSize];
SerializedPacket serialized_packet =
packet_creator_.SerializePacket(buffer, kMaxPacketSize);
- DCHECK(serialized_packet.packet);
+ if (serialized_packet.packet == nullptr) {
+ LOG(DFATAL) << "Failed to SerializePacket. fec_policy:" << fec_send_policy_
+ << " should_fec_protect_:" << should_fec_protect_;
+ delegate_->CloseConnection(QUIC_FAILED_TO_SERIALIZE_PACKET, false);
+ return;
+ }
// There may be AckNotifiers interested in this packet.
serialized_packet.notifiers.swap(ack_notifiers_);
« no previous file with comments | « net/quic/quic_packet_creator.cc ('k') | net/quic/quic_packet_generator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698