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

Unified Diff: net/quic/core/quic_framer.cc

Issue 2962203002: Replace a DCHECK with a return false, when processing invalid stop waiting data. (Closed)
Patch Set: Created 3 years, 6 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 | « no previous file | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_framer.cc
diff --git a/net/quic/core/quic_framer.cc b/net/quic/core/quic_framer.cc
index 84337191eb72a27daa26fa9f736fcf503d7d8b67..f5d771c361fbb42e9a5ab1b7390a72512873e360 100644
--- a/net/quic/core/quic_framer.cc
+++ b/net/quic/core/quic_framer.cc
@@ -1316,7 +1316,10 @@ bool QuicFramer::ProcessStopWaitingFrame(QuicDataReader* reader,
set_detailed_error("Unable to read least unacked delta.");
return false;
}
- DCHECK_GE(header.packet_number, least_unacked_delta);
+ if (header.packet_number < least_unacked_delta) {
+ set_detailed_error("Invalid unacked delta.");
+ return false;
+ }
stop_waiting->least_unacked = header.packet_number - least_unacked_delta;
return true;
« no previous file with comments | « no previous file | net/quic/core/quic_framer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698