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

Unified Diff: remoting/host/desktop_session_win.cc

Issue 12390027: Crash the network or desktop process when an unknown IPC message is received. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback Created 7 years, 10 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
Index: remoting/host/desktop_session_win.cc
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc
index 182111d9cd23702a9b31571bb204ed937771768d..97ed8c4aae4f067b0fd8854c8df8a09796a66569 100644
--- a/remoting/host/desktop_session_win.cc
+++ b/remoting/host/desktop_session_win.cc
@@ -82,6 +82,12 @@ bool DesktopSessionWin::OnMessageReceived(const IPC::Message& message) {
OnInjectSas)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+
+ if (!handled) {
+ LOG(ERROR) << "Received unexpected IPC type: " << message.type();
+ RestartDesktopProcess(FROM_HERE);
+ }
+
return handled;
}

Powered by Google App Engine
This is Rietveld 408576698