qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 06/25] vvfat: fat_chksum(): fix access above array b


From: Kevin Wolf
Subject: [Qemu-devel] [PATCH 06/25] vvfat: fat_chksum(): fix access above array bounds
Date: Wed, 8 Sep 2010 15:29:23 +0200

From: Loïc Minier <address@hidden>

Signed-off-by: Loïc Minier <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
 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* entry)
     for(i=0;i<11;i++) {
         unsigned char c;
 
-        c = (i <= 8) ? entry->name[i] : entry->extension[i-8];
+        c = (i < 8) ? entry->name[i] : entry->extension[i-8];
         chksum=(((chksum&0xfe)>>1)|((chksum&0x01)?0x80:0)) + c;
     }
 
-- 
1.7.2.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]