diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-11-13 14:33:29 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-11-13 14:33:29 +0000 |
commit | 4e8a737c092d25fe5ff99ac7bff01c222c1c017d (patch) | |
tree | 6a8eb1e48c264f6216e1987d83ef982e357b201f /hw/display/vmware_vga.c | |
parent | 7edaf99759017d3e175e37cffc3536e86a3bd380 (diff) | |
parent | cf7040e284069fc235172c187551b268c66d8553 (diff) |
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20171110-pull-request' into staging
vga: bugfixes for 2.11
# gpg: Signature made Fri 10 Nov 2017 13:26:30 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/vga-20171110-pull-request:
vmsvga: use ARRAY_SIZE macro
vga: fix region checks in wraparound case
virtio-gpu: fix bug in host memory calculation.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/vmware_vga.c')
-rw-r--r-- | hw/display/vmware_vga.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index cdc3fed6ca..0e6673a911 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -679,10 +679,9 @@ static void vmsvga_fifo_run(struct vmsvga_state_s *s) if (cursor.width > 256 || cursor.height > 256 || cursor.bpp > 32 - || SVGA_BITMAP_SIZE(x, y) - > sizeof(cursor.mask) / sizeof(cursor.mask[0]) + || SVGA_BITMAP_SIZE(x, y) > ARRAY_SIZE(cursor.mask) || SVGA_PIXMAP_SIZE(x, y, cursor.bpp) - > sizeof(cursor.image) / sizeof(cursor.image[0])) { + > ARRAY_SIZE(cursor.image)) { goto badcmd; } |