qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fat_chksum(): fix access above array bounds
@ 2010-08-21 22:47 Loïc Minier
  2010-08-23 14:42 ` Kevin Wolf
  0 siblings, 1 reply; 3+ messages in thread
From: Loïc Minier @ 2010-08-21 22:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Loïc Minier

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
---
 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.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-08-23 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-21 22:47 [Qemu-devel] [PATCH] fat_chksum(): fix access above array bounds Loïc Minier
2010-08-23 14:42 ` Kevin Wolf
2010-08-23 14:56   ` Loïc Minier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).