diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2016-05-19 12:26:00 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-05-23 13:30:03 +0200 |
commit | 6b860806c0dd881373ead661c0f3499eca2c3995 (patch) | |
tree | 8882cd5456590affcf979a93c965ef7b369cb55a /hw/display/virtio-gpu.c | |
parent | acfc4846508a02cc4c83aa27799fd74ac280bdb2 (diff) | |
download | qemu-6b860806c0dd881373ead661c0f3499eca2c3995.zip qemu-6b860806c0dd881373ead661c0f3499eca2c3995.tar.gz qemu-6b860806c0dd881373ead661c0f3499eca2c3995.tar.bz2 |
virtio-gpu: fix ui idx check
Fix off-by-one value check (0 is the first scanout).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-7-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/virtio-gpu.c')
-rw-r--r-- | hw/display/virtio-gpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index bc10d5d..f3b0f14 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -879,7 +879,7 @@ static int virtio_gpu_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info) { VirtIOGPU *g = opaque; - if (idx > g->conf.max_outputs) { + if (idx >= g->conf.max_outputs) { return -1; } |