kernel32: Fix a FAT format sanity check for floppies.
This commit is contained in:
parent
3b7a5d410e
commit
1379269587
|
@ -368,7 +368,7 @@ static enum fs_type VOLUME_ReadFATSuperblock( HANDLE handle, BYTE *buff )
|
||||||
reasonable = num_boot_sectors < total_sectors &&
|
reasonable = num_boot_sectors < total_sectors &&
|
||||||
num_fats < 16 &&
|
num_fats < 16 &&
|
||||||
bytes_per_sector >= 512 && bytes_per_sector % 512 == 0 &&
|
bytes_per_sector >= 512 && bytes_per_sector % 512 == 0 &&
|
||||||
sectors_per_cluster > 1;
|
sectors_per_cluster >= 1;
|
||||||
if (!reasonable) return FS_UNKNOWN;
|
if (!reasonable) return FS_UNKNOWN;
|
||||||
sectors = total_sectors - num_boot_sectors - num_fats * sect_per_fat -
|
sectors = total_sectors - num_boot_sectors - num_fats * sect_per_fat -
|
||||||
(num_root_dir_ents * 32 + bytes_per_sector - 1) / bytes_per_sector;
|
(num_root_dir_ents * 32 + bytes_per_sector - 1) / bytes_per_sector;
|
||||||
|
|
Loading…
Reference in New Issue