提交 6b860806 编写于 作者: M Marc-André Lureau 提交者: Gerd Hoffmann

virtio-gpu: fix ui idx check

Fix off-by-one value check (0 is the first scanout).
Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-7-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 acfc4846
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册