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

Unified Diff: mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data

Issue 486313004: Mojo cpp bindings: More clear checks for array num_bytes and num_elements. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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
Index: mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data
diff --git a/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data b/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data
new file mode 100644
index 0000000000000000000000000000000000000000..059e5380f27aa24597d7bab8313af4cb5fdba48a
--- /dev/null
+++ b/mojo/public/interfaces/bindings/tests/data/validation/conformance_mthd8_array_num_bytes_overflow.data
@@ -0,0 +1,19 @@
+[dist4]message_header // num_bytes
+[u4]2 // num_fields
+[u4]8 // name
+[u4]0 // flags
+[anchr]message_header
+
+[dist4]method8_params // num_bytes
+[u4]1 // num_fields
+[dist8]param0_ptr // param0
+[anchr]method8_params
+
+[anchr]param0_ptr
+[dist4]array_param // num_bytes
+[u4]0x20000001 // num_elements: The corresponding array size should be
+ // 0x20000001 * 8 + 8 = 0x100000010 which is
+ // 2^32 + 16 (base-10), while |num_bytes| is a 32-bit
+ // unsigned integer and its value is 16.
+[u8]0
+[anchr]array_param

Powered by Google App Engine
This is Rietveld 408576698