From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59363 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OtKpy-0002rl-ON for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:37:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OtKic-0005a5-I4 for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12112) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OtKic-0005Zo-98 for qemu-devel@nongnu.org; Wed, 08 Sep 2010 09:29:42 -0400 From: Kevin Wolf Date: Wed, 8 Sep 2010 15:29:23 +0200 Message-Id: <1283952582-17498-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1283952582-17498-1-git-send-email-kwolf@redhat.com> References: <1283952582-17498-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/25] 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