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

Issue 643133003: [GCM] Fix crash when size packet splits two socket reads (Closed)

Created:
6 years, 2 months ago by Nicolas Zea
Modified:
6 years, 2 months ago
Reviewers:
fgorski
CC:
chromium-reviews, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[GCM] Fix crash when size packet splits two socket reads ByteCount(), rather than UnreadByteCount(), was being incorrectly used to determine how to handle a size packet than needed a second byte. ByteCount() includes read bytes, while UnreadByteCount() is the one that does not. UnreadByteCount is the only one that should be used here. Fixed, and added new tests. BUG=424532 Committed: https://crrev.com/7592d13c4d3b73bcfae418bf451981f72fa9bd77 Cr-Commit-Position: refs/heads/master@{#300525}

Patch Set 1 #

Patch Set 2 : Tests/corner cases #

Total comments: 8

Patch Set 3 : Address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -11 lines) Patch
M google_apis/gcm/engine/connection_handler_impl.cc View 1 2 5 chunks +19 lines, -7 lines 0 comments Download
M google_apis/gcm/engine/connection_handler_impl_unittest.cc View 1 2 4 chunks +104 lines, -4 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
Nicolas Zea
PTAL
6 years, 2 months ago (2014-10-20 21:38:29 UTC) #3
fgorski
lgtm with a few nits and a question. https://codereview.chromium.org/643133003/diff/40001/google_apis/gcm/engine/connection_handler_impl.cc File google_apis/gcm/engine/connection_handler_impl.cc (right): https://codereview.chromium.org/643133003/diff/40001/google_apis/gcm/engine/connection_handler_impl.cc#newcode330 google_apis/gcm/engine/connection_handler_impl.cc:330: int ...
6 years, 2 months ago (2014-10-20 22:11:55 UTC) #4
Nicolas Zea
https://codereview.chromium.org/643133003/diff/40001/google_apis/gcm/engine/connection_handler_impl.cc File google_apis/gcm/engine/connection_handler_impl.cc (right): https://codereview.chromium.org/643133003/diff/40001/google_apis/gcm/engine/connection_handler_impl.cc#newcode330 google_apis/gcm/engine/connection_handler_impl.cc:330: int prev_byte_count = input_stream_->UnreadByteCount(); On 2014/10/20 22:11:54, fgorski wrote: ...
6 years, 2 months ago (2014-10-21 00:02:54 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/643133003/60001
6 years, 2 months ago (2014-10-21 00:04:46 UTC) #7
commit-bot: I haz the power
Exceeded time limit waiting for builds to trigger.
6 years, 2 months ago (2014-10-21 02:08:49 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/643133003/60001
6 years, 2 months ago (2014-10-21 17:39:53 UTC) #11
commit-bot: I haz the power
Committed patchset #3 (id:60001)
6 years, 2 months ago (2014-10-21 18:21:54 UTC) #12
commit-bot: I haz the power
6 years, 2 months ago (2014-10-21 18:22:41 UTC) #13
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/7592d13c4d3b73bcfae418bf451981f72fa9bd77
Cr-Commit-Position: refs/heads/master@{#300525}

Powered by Google App Engine
This is Rietveld 408576698