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

Issue 486313004: Mojo cpp bindings: More clear checks for array num_bytes and num_elements. (Closed)

Created:
6 years, 4 months ago by yzshen1
Modified:
6 years, 4 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Project:
chromium
Visibility:
Public.

Description

Mojo cpp bindings: More clear checks for array num_bytes and num_elements. This CL (1) handles the case that Array<>'s element number or total size exceeds what we can represent in Mojo messages; (2) makes the validation code of the num_bytes field doesn't rely on sizeof(size_t) > sizeof(uint32_t). The newly-added test passes with/without this CL. But I think it is good to have such a test. BUG=None TEST=None Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=290718

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -21 lines) Patch
M mojo/public/cpp/bindings/lib/array_internal.h View 1 2 3 7 chunks +41 lines, -17 lines 0 comments Download
M mojo/public/cpp/bindings/lib/array_serialization.h View 1 chunk +6 lines, -4 lines 0 comments Download
M mojo/public/cpp/bindings/lib/string_serialization.cc View 1 chunk +2 lines, -1 line 0 comments Download
A mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
A + mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.expected View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
yzshen1
Hi, Darin. Would you please take a look? Thanks!
6 years, 4 months ago (2014-08-19 22:31:21 UTC) #1
darin (slow to review)
LGTM
6 years, 4 months ago (2014-08-19 23:00:02 UTC) #2
yzshen1
The CQ bit was checked by yzshen@chromium.org
6 years, 4 months ago (2014-08-19 23:44:09 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yzshen@chromium.org/486313004/60001
6 years, 4 months ago (2014-08-19 23:45:13 UTC) #4
commit-bot: I haz the power
6 years, 4 months ago (2014-08-20 00:49:42 UTC) #5
Message was sent while issue was closed.
Committed patchset #4 (60001) as 290718

Powered by Google App Engine
This is Rietveld 408576698