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

Unified Diff: mojo/edk/system/ports/message.h

Issue 1988413002: [mojo-edk] Sanity checks on ports message parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 | « mojo/edk/system/node_controller.cc ('k') | mojo/edk/system/ports/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/ports/message.h
diff --git a/mojo/edk/system/ports/message.h b/mojo/edk/system/ports/message.h
index df3b8f2ddbf962e96ff91a890eac4b7993fef1b7..926ce752a844669aa2430a5875e37417fac11690 100644
--- a/mojo/edk/system/ports/message.h
+++ b/mojo/edk/system/ports/message.h
@@ -26,8 +26,9 @@ class Message {
public:
virtual ~Message() {}
- // Inspect the message at |bytes| and return the size of each section.
- static void Parse(const void* bytes,
+ // Inspect the message at |bytes| and return the size of each section. Returns
+ // |false| if the message is malformed and |true| otherwise.
+ static bool Parse(const void* bytes,
size_t num_bytes,
size_t* num_header_bytes,
size_t* num_payload_bytes,
« no previous file with comments | « mojo/edk/system/node_controller.cc ('k') | mojo/edk/system/ports/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698