From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=42442 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq7IL-0001ye-JH for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:34:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq7Hb-00054G-8T for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:32:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35019) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq7Ha-00053y-UA for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:32:31 -0400 From: Kevin Wolf Date: Mon, 30 Aug 2010 18:32:29 +0200 Message-Id: <1283185953-30639-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1283185953-30639-1-git-send-email-kwolf@redhat.com> References: <1283185953-30639-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 06/10] vvfat: fat_chksum(): fix access above array bounds List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Lo=C3=AFc Minier Signed-off-by: Lo=C3=AFc Minier Signed-off-by: Kevin Wolf --- block/vvfat.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index 6d61c2e..365332a 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -512,7 +512,7 @@ static inline uint8_t fat_chksum(const direntry_t* en= try) for(i=3D0;i<11;i++) { unsigned char c; =20 - c =3D (i <=3D 8) ? entry->name[i] : entry->extension[i-8]; + c =3D (i < 8) ? entry->name[i] : entry->extension[i-8]; chksum=3D(((chksum&0xfe)>>1)|((chksum&0x01)?0x80:0)) + c; } =20 --=20 1.7.2.2