From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2Z-00040V-70 for qemu-devel@nongnu.org; Mon, 23 May 2016 08:33:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4p2S-0008IV-VK for qemu-devel@nongnu.org; Mon, 23 May 2016 08:32:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4p2S-0008Hj-Qr for qemu-devel@nongnu.org; Mon, 23 May 2016 08:32:52 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59AFF15565 for ; Mon, 23 May 2016 12:32:51 +0000 (UTC) From: Gerd Hoffmann Date: Mon, 23 May 2016 14:32:42 +0200 Message-Id: <1464006764-8115-7-git-send-email-kraxel@redhat.com> In-Reply-To: <1464006764-8115-1-git-send-email-kraxel@redhat.com> References: <1464006764-8115-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 6/7] virtio-gpu: fix ui idx check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann , "Michael S. Tsirkin" From: Marc-Andr=C3=A9 Lureau Fix off-by-one value check (0 is the first scanout). Signed-off-by: Marc-Andr=C3=A9 Lureau Message-id: 1463653560-26958-7-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann --- hw/display/virtio-gpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 =3D opaque; =20 - if (idx > g->conf.max_outputs) { + if (idx >=3D g->conf.max_outputs) { return -1; } =20 --=20 1.8.3.1