diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-04 09:50:29 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-15 07:16:56 +0200 |
commit | 4fa7b4cc500e1fbd8c11e65548b7713db81e75ff (patch) | |
tree | 09dc73db2cf2931c6831e544f66cfe50954da41b /hw/display/virtio-vga.h | |
parent | 25b2ef2e8ee23109b0c3ce9ea71330bf8a7d12bd (diff) |
virtio-gpu: move scanout_id sanity check
Checking scanout_id in virtio_gpu_do_set_scanout() is too late, for the
"resource_id == 0" case (aka disable scanout) the scanout_id is used
unchecked. Move the check into the callers to fix that.
Fixes: e64d4b6a9bc3 ("virtio-gpu: Refactor virtio_gpu_set_scanout")
Fixes: 32db3c63ae11 ("virtio-gpu: Add virtio_gpu_set_scanout_blob")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/383
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
Message-Id: <20210604075029.1201478-1-kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-vga.h')
0 files changed, 0 insertions, 0 deletions