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

Unified Diff: mojo/public/cpp/bindings/lib/message.cc

Issue 229683005: Validate MessageHeader before using (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove debug printfs Created 6 years, 8 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/public/cpp/bindings/lib/connector.cc ('k') | mojo/public/cpp/bindings/lib/message_header_validator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/message.cc
diff --git a/mojo/public/cpp/bindings/lib/message.cc b/mojo/public/cpp/bindings/lib/message.cc
index 8ec188e2c798d18d7a3fca46cf863224fa04f76e..1db071f3b7373b9a8aa2c4983a0f29f76938c6a0 100644
--- a/mojo/public/cpp/bindings/lib/message.cc
+++ b/mojo/public/cpp/bindings/lib/message.cc
@@ -9,6 +9,8 @@
#include <algorithm>
+#include "mojo/public/cpp/bindings/lib/message_header_validator.h"
+
namespace mojo {
Message::Message()
@@ -73,9 +75,8 @@ MojoResult ReadAndDispatchMessage(MessagePipeHandle handle,
&num_handles,
MOJO_READ_MESSAGE_FLAG_NONE);
if (receiver && rv == MOJO_RESULT_OK) {
- bool result = receiver->Accept(&message);
- if (receiver_result)
- *receiver_result = result;
+ *receiver_result =
+ internal::MessageHeaderValidator(receiver).Accept(&message);
}
return rv;
« no previous file with comments | « mojo/public/cpp/bindings/lib/connector.cc ('k') | mojo/public/cpp/bindings/lib/message_header_validator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698