]> Git Repo - qemu.git/commitdiff
virtio-gpu: fix ui idx check
authorMarc-André Lureau <[email protected]>
Thu, 19 May 2016 10:26:00 +0000 (12:26 +0200)
committerGerd Hoffmann <[email protected]>
Mon, 23 May 2016 11:30:03 +0000 (13:30 +0200)
Fix off-by-one value check (0 is the first scanout).

Signed-off-by: Marc-André Lureau <[email protected]>
Message-id: 1463653560[email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
hw/display/virtio-gpu.c

index bc10d5ddc07ee09d57759c9e61ce5789c6dd6aac..f3b0f1419ed4a28e0dd74b60bbd4a66b10e4255d 100644 (file)
@@ -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;
     }
 
This page took 0.028241 seconds and 4 git commands to generate.