virtio-gpu: add sanity check
commitda35f7f1eeff9f249a9597400fc514c83fd3a0f8
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 27 May 2019 09:12:26 +0000 (27 11:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Tue, 28 May 2019 06:14:44 +0000 (28 08:14 +0200)
treee90bd5cc8c9b9acc91ff5b5d46c50cf8e337b240
parenta7b21f6762a2d6ec08106d8a7ccb11829914523f
virtio-gpu: add sanity check

Require a minimum 16x16 size for the scanout, to make sure the guest
can't set either width or height to zero.  This (a) doesn't make sense
at all and (b) causes problems in some UI code.  When using spice this
will triggers an assert().

Reported-by: Tyler Slabinski <tslabinski@slabity.net>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20190527091226.4943-1-kraxel@redhat.com
hw/display/virtio-gpu.c