]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - fs/fat/fat.c
FAT: buffer overflow with FAT12/16
[karo-tx-uboot.git] / fs / fat / fat.c
index 744e961847263f17da8058bb06736daf967178c0..a75e4f258aa1ec768f28d3fe3f8ac2a1bcc9a87d 100644 (file)
@@ -858,7 +858,7 @@ do_fat_read (const char *filename, void *buffer, unsigned long maxsize,
                if (disk_read(cursect,
                                (mydata->fatsize == 32) ?
                                (mydata->clust_size) :
-                               LINEAR_PREFETCH_SIZE,
+                               LINEAR_PREFETCH_SIZE / SECTOR_SIZE,
                                do_fat_read_block) < 0) {
                        debug("Error: reading rootdir block\n");
                        return -1;