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

Unified Diff: mojo/public/cpp/bindings/lib/validation_util.h

Issue 2286513002: Mojo C++ bindings: fix inlined union validation. (Closed)
Patch Set: add a test case Created 4 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
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/validation_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/validation_util.h
diff --git a/mojo/public/cpp/bindings/lib/validation_util.h b/mojo/public/cpp/bindings/lib/validation_util.h
index 1c6c53cb23eba61f6139a66e712ba6055d5628b9..124e9e69698cd7722082c84cf57463490cd5bc47 100644
--- a/mojo/public/cpp/bindings/lib/validation_util.h
+++ b/mojo/public/cpp/bindings/lib/validation_util.h
@@ -50,12 +50,12 @@ bool ValidateStructHeaderAndClaimMemory(const void* data,
ValidationContext* validation_context);
// Validates that |data| contains a valid union header, in terms of alignment
-// and size. If not inlined, it checks that the memory range
-// [data, data + num_bytes) is not marked as occupied by other objects in
-// |validation_context|. On success, the memory range is marked as occupied.
-bool ValidateUnionHeaderAndClaimMemory(const void* data,
- bool inlined,
- ValidationContext* validation_context);
+// and size. It checks that the memory range [data, data + kUnionDataSize) is
+// not marked as occupied by other objects in |validation_context|. On success,
+// the memory range is marked as occupied.
+bool ValidateNonInlinedUnionHeaderAndClaimMemory(
+ const void* data,
+ ValidationContext* validation_context);
// Validates that the message is a request which doesn't expect a response.
bool ValidateMessageIsRequestWithoutResponse(
« no previous file with comments | « no previous file | mojo/public/cpp/bindings/lib/validation_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698