Index: remoting/host/setup/me2me_native_messaging_host.cc |
diff --git a/remoting/host/setup/me2me_native_messaging_host.cc b/remoting/host/setup/me2me_native_messaging_host.cc |
index fc77b9f963e180f404eee4f811aa5dc862c9317f..574a37e3e6ead351f18156eb418cac914be8a0f4 100644 |
--- a/remoting/host/setup/me2me_native_messaging_host.cc |
+++ b/remoting/host/setup/me2me_native_messaging_host.cc |
@@ -104,6 +104,12 @@ void Me2MeNativeMessagingHost::Start( |
void Me2MeNativeMessagingHost::OnMessage(scoped_ptr<base::Value> message) { |
DCHECK(thread_checker_.CalledOnValidThread()); |
+ if (message->GetType() != base::Value::TYPE_DICTIONARY) { |
+ LOG(ERROR) << "Received a message that's not a dictionary."; |
+ channel_->SendMessage(nullptr); |
+ return; |
+ } |
+ |
scoped_ptr<base::DictionaryValue> message_dict( |
static_cast<base::DictionaryValue*>(message.release())); |
scoped_ptr<base::DictionaryValue> response(new base::DictionaryValue()); |