diff options
author | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 18:25:40 +0000 |
---|---|---|
committer | mbelshe@google.com <mbelshe@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-20 18:25:40 +0000 |
commit | 8806b8a53168e161e8a2cbbf4051067c095832a9 (patch) | |
tree | ecf42e39e38f50a681dccfc8bc18aef3ce80a1d5 | |
parent | 84b562f4cc01dc7a292ac4ff26703d4e3ac3ce29 (diff) | |
download | chromium_src-8806b8a53168e161e8a2cbbf4051067c095832a9.zip chromium_src-8806b8a53168e161e8a2cbbf4051067c095832a9.tar.gz chromium_src-8806b8a53168e161e8a2cbbf4051067c095832a9.tar.bz2 |
Add a sanity check into the framer; this trips
often if you send bad data into the framer and helps
debug early.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/418008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32630 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/flip/flip_framer.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/flip/flip_framer.cc b/net/flip/flip_framer.cc index dba9574..7dc93ac 100644 --- a/net/flip/flip_framer.cc +++ b/net/flip/flip_framer.cc @@ -229,6 +229,7 @@ size_t FlipFramer::ProcessCommonHeader(const char* data, size_t len) { break; } remaining_payload_ = current_frame.length(); + DCHECK_LE(remaining_payload_, 1000000u); // Sanity! // if we're here, then we have the common header all received. if (!current_frame.is_control_frame()) CHANGE_STATE(FLIP_FORWARD_STREAM_FRAME); |