From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn6E7-00019s-VJ for qemu-devel@nongnu.org; Tue, 17 Jan 2012 05:25:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rn6E4-0001F0-1q for qemu-devel@nongnu.org; Tue, 17 Jan 2012 05:25:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rn6E3-0001Es-PT for qemu-devel@nongnu.org; Tue, 17 Jan 2012 05:25:11 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q0HAPAER011260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 17 Jan 2012 05:25:10 -0500 From: Markus Armbruster References: <1320399264-28581-1-git-send-email-armbru@redhat.com> Date: Tue, 17 Jan 2012 10:08:47 +0100 In-Reply-To: <1320399264-28581-1-git-send-email-armbru@redhat.com> (Markus Armbruster's message of "Fri, 4 Nov 2011 10:34:24 +0100") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH] qxl: Slot sanity check in qxl_phys2virt() is off by one, fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kraxel@redhat.com Ping? Markus Armbruster writes: > Spotted by Coverity. > > Signed-off-by: Markus Armbruster > --- > hw/qxl.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/hw/qxl.c b/hw/qxl.c > index 84ffd45..c97bebe 100644 > --- a/hw/qxl.c > +++ b/hw/qxl.c > @@ -1006,7 +1006,7 @@ void *qxl_phys2virt(PCIQXLDevice *qxl, QXLPHYSICAL pqxl, int group_id) > case MEMSLOT_GROUP_HOST: > return (void*)offset; > case MEMSLOT_GROUP_GUEST: > - PANIC_ON(slot > NUM_MEMSLOTS); > + PANIC_ON(slot >= NUM_MEMSLOTS); > PANIC_ON(!qxl->guest_slots[slot].active); > PANIC_ON(offset < qxl->guest_slots[slot].delta); > offset -= qxl->guest_slots[slot].delta;