summaryrefslogtreecommitdiffstats
path: root/ui/vnc.c
diff options
context:
space:
mode:
authorPeter Maydell2018-01-25 19:06:25 +0100
committerPeter Maydell2018-01-25 19:06:25 +0100
commitd2bc6e1f62241085351005c88bed0b576b23da91 (patch)
tree38af5ff2f0323b9a86ebfe01f3f682f411f7f81b /ui/vnc.c
parentMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180125'... (diff)
parentsdl: reorganize -no-frame support (diff)
downloadqemu-d2bc6e1f62241085351005c88bed0b576b23da91.tar.gz
qemu-d2bc6e1f62241085351005c88bed0b576b23da91.tar.xz
qemu-d2bc6e1f62241085351005c88bed0b576b23da91.zip
Merge remote-tracking branch 'remotes/kraxel/tags/ui-20180125-pull-request' into staging
ui: convert to keycodedb, fix sign extension sdl: cleanups, deprecate sdl 1.2 # gpg: Signature made Thu 25 Jan 2018 14:31:47 GMT # gpg: using RSA key 0x4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20180125-pull-request: sdl: reorganize -no-frame support sdl: use ctrl-alt-g as grab hotkey ui: deprecate use of SDL 1.2 in favour of 2.0 series ui: ignore hardware keycode 255 on win32 ui: add fix for GTK Pause key handling on Win32 ui: convert GTK and SDL1 frontends to keycodemapdb ui: convert the SDL2 frontend to keycodemapdb ui: avoid sign extension using client width/height Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'ui/vnc.c')
-rw-r--r--ui/vnc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/vnc.c b/ui/vnc.c
index 665a143578..33b087221f 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -672,6 +672,11 @@ static void vnc_desktop_resize(VncState *vs)
vs->client_height == pixman_image_get_height(vs->vd->server)) {
return;
}
+
+ assert(pixman_image_get_width(vs->vd->server) < 65536 &&
+ pixman_image_get_width(vs->vd->server) >= 0);
+ assert(pixman_image_get_height(vs->vd->server) < 65536 &&
+ pixman_image_get_height(vs->vd->server) >= 0);
vs->client_width = pixman_image_get_width(vs->vd->server);
vs->client_height = pixman_image_get_height(vs->vd->server);
vnc_lock_output(vs);
@@ -2490,6 +2495,10 @@ static int protocol_client_init(VncState *vs, uint8_t *data, size_t len)
return 0;
}
+ assert(pixman_image_get_width(vs->vd->server) < 65536 &&
+ pixman_image_get_width(vs->vd->server) >= 0);
+ assert(pixman_image_get_height(vs->vd->server) < 65536 &&
+ pixman_image_get_height(vs->vd->server) >= 0);
vs->client_width = pixman_image_get_width(vs->vd->server);
vs->client_height = pixman_image_get_height(vs->vd->server);
vnc_write_u16(vs, vs->client_width);