]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-gpu: fix potential divide-by-zero regression
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 4 Jul 2023 09:16:42 +0000 (11:16 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 17 Jul 2023 11:20:18 +0000 (15:20 +0400)
commit9c18a9234bab9d5e903f897b30fb4a37888aebfc
tree0d007dc3ca25e7a26f1982d63f77c8bb99ba31e7
parented8ad9728a9c0eec34db9dff61dfa2f1dd625637
virtio-gpu: fix potential divide-by-zero regression

Commit 9462ff4695aa0 ("virtio-gpu/win32: allocate shareable 2d
resources/images") introduces a division, which can lead to crashes when
"height" is 0.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1744
Reviewed-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
hw/display/virtio-gpu.c