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

Unified Diff: mojo/public/cpp/bindings/lib/connector.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/c/test_support/test_support.h ('k') | mojo/public/cpp/bindings/lib/message.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/lib/connector.cc
diff --git a/mojo/public/cpp/bindings/lib/connector.cc b/mojo/public/cpp/bindings/lib/connector.cc
index 319631cbdf8cc8c0d281c2d3c9d8ed7ba4377e76..17f960442fee36f2ff31c9db129f0512babc4321 100644
--- a/mojo/public/cpp/bindings/lib/connector.cc
+++ b/mojo/public/cpp/bindings/lib/connector.cc
@@ -114,12 +114,14 @@ void Connector::ReadMore() {
while (true) {
MojoResult rv;
- rv = ReadAndDispatchMessage(message_pipe_.get(), incoming_receiver_, NULL);
+ bool receiver_result;
+ rv = ReadAndDispatchMessage(message_pipe_.get(), incoming_receiver_,
+ &receiver_result);
if (rv == MOJO_RESULT_SHOULD_WAIT) {
WaitToReadMore();
break;
}
- if (rv != MOJO_RESULT_OK) {
+ if (rv != MOJO_RESULT_OK || !receiver_result) {
error_ = true;
break;
}
« no previous file with comments | « mojo/public/c/test_support/test_support.h ('k') | mojo/public/cpp/bindings/lib/message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698