2009-02-09 Felix Zielcke <fzielcke@z-51.de>

fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
	bpb.version_specific.fat12_or_fat16.fstype and
	bpb.version_specific.fat32.fstype.
This commit is contained in:
fzielcke 2009-02-09 14:17:19 +00:00
parent be110b3076
commit 6dca6fe432
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2009-02-09 Felix Zielcke <fzielcke@z-51.de>
fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
bpb.version_specific.fat12_or_fat16.fstype and
bpb.version_specific.fat32.fstype.
2009-02-08 Robert Millan <rmh@aybabtu.com>
* fs/tar.c: Replace "fs/cpio.c" with "cpio.c".

View file

@ -187,6 +187,11 @@ grub_fat_mount (grub_disk_t disk)
if (grub_disk_read (disk, 0, 0, sizeof (bpb), (char *) &bpb))
goto fail;
if (! grub_strncmp((const char *) bpb.version_specific.fat12_or_fat16.fstype, "FAT12",5)
|| ! grub_strncmp((const char *) bpb.version_specific.fat12_or_fat16.fstype, "FAT16",5)
|| ! grub_strncmp((const char *) bpb.version_specific.fat32.fstype, "FAT32",5))
goto fail;
/* Get the sizes of logical sectors and clusters. */
data->logical_sector_bits =
fat_log2 (grub_le_to_cpu16 (bpb.bytes_per_sector));