hw/qxl: guest bug on primary create with stride %4 != 0
authorAlon Levy <alevy@redhat.com>
Mon, 15 Oct 2012 12:54:03 +0000 (14:54 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 5 Nov 2012 10:49:21 +0000 (11:49 +0100)
commit48f4ba671bbb3dd212002d57b72a23375f51619b
tree71797b6ea1c0b72b9f0df6e20e27b207b10d5153
parent1cfd981ff1e8ff0858cd71cfae0c7c7ba741f380
hw/qxl: guest bug on primary create with stride %4 != 0

Due to usage of pixman for rendering on all spice surfaces we have
pixman's requirement that the stride be word aligned. A guest not
honoring that can crash spice and qemu with it due to failure to create
a surface (in spice-server). Avoid this early on in primary surface
creation and offscreen surface creation.

Recently windows guests got odd width support which triggers a non word
aligned primary surface in 16bit color depth. Off screen surfaces have
always been word aligned, but doesn't hurt to check them here too.

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/qxl.c