From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=33876 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oq7cK-0001To-Qf for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:53:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oq7cH-0001CD-SI for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:53:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57037) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oq7cH-0001Bp-Jv for qemu-devel@nongnu.org; Mon, 30 Aug 2010 12:53:53 -0400 From: Kevin Wolf Date: Mon, 30 Aug 2010 18:53:52 +0200 Message-Id: <1283187233-3925-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1283187233-3925-1-git-send-email-kwolf@redhat.com> References: <1283187233-3925-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] [STABLE 0.13][PATCH 5/6] 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 (cherry picked from commit 2aa326be0d2039f51192707bdb2fc935d0e87c21) --- 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