diff options
Diffstat (limited to 'remoting/client/plugin')
-rw-r--r-- | remoting/client/plugin/chromoting_instance.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc index 871b99b..90f08287 100644 --- a/remoting/client/plugin/chromoting_instance.cc +++ b/remoting/client/plugin/chromoting_instance.cc @@ -456,6 +456,14 @@ void ChromotingInstance::SetCursorShape( return; } + uint32 cursor_total_bytes = width * height * kBytesPerPixel; + if (cursor_shape.data().size() < cursor_total_bytes) { + VLOG(2) << "Expected " << cursor_total_bytes << " bytes for a " + << width << "x" << height << " cursor. Only received " + << cursor_shape.data().size() << " bytes"; + return; + } + if (pp::ImageData::GetNativeImageDataFormat() != PP_IMAGEDATAFORMAT_BGRA_PREMUL) { VLOG(2) << "Unable to set cursor shape - non-native image format"; |