summaryrefslogtreecommitdiff
path: root/hw/display/virtio-gpu.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2016-05-19 12:26:00 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-05-23 13:30:03 +0200
commit6b860806c0dd881373ead661c0f3499eca2c3995 (patch)
tree8882cd5456590affcf979a93c965ef7b369cb55a /hw/display/virtio-gpu.c
parentacfc4846508a02cc4c83aa27799fd74ac280bdb2 (diff)
downloadqemu-6b860806c0dd881373ead661c0f3499eca2c3995.zip
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index bc10d5ddc0..f3b0f1419e 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;
}