Chromium Code Reviews| Index: remoting/protocol/host_control_dispatcher.cc |
| diff --git a/remoting/protocol/host_control_dispatcher.cc b/remoting/protocol/host_control_dispatcher.cc |
| index 7f3ea272e1affdf4c0aa8281ce3834115fe84815..3e5260cfab7eb736b3d214e37169a28128835b85 100644 |
| --- a/remoting/protocol/host_control_dispatcher.cc |
| +++ b/remoting/protocol/host_control_dispatcher.cc |
| @@ -75,7 +75,13 @@ void HostControlDispatcher::OnIncomingMessage( |
| if (message->has_clipboard_event()) { |
| clipboard_stub_->InjectClipboardEvent(message->clipboard_event()); |
| } else if (message->has_client_resolution()) { |
| - host_stub_->NotifyClientResolution(message->client_resolution()); |
| + const ClientResolution& resolution = message->client_resolution(); |
| + if (!resolution.has_dips_width() || !resolution.has_dips_height() || |
| + resolution.dips_width() <= 0 || resolution.dips_height() <= 0) { |
| + LOG(ERROR) << "Received invalid ClientResolution message."; |
| + return; |
| + } |
| + host_stub_->NotifyClientResolution(resolution); |
|
Jamie
2016/05/31 20:40:47
It seems odd that this is the only message we vali
Sergey Ulanov
2016/06/01 10:08:51
Agree. Added a TODO.
|
| } else if (message->has_video_control()) { |
| host_stub_->ControlVideo(message->video_control()); |
| } else if (message->has_audio_control()) { |