diff --git a/ChangeLog b/ChangeLog index 77f879d8c..6b017d1a8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2012-04-25 Vladimir Serbinenko + + * grub-core/fs/ntfs.c (grub_ntfs_mount): Support 256-byte sectors, + as long as cluster size is multiple of 512 bytes. + 2012-04-23 Vladimir Serbinenko * util/grub-mkrescue.in: Fix locale directory. diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index 31c01f3d5..30293ddfe 100644 --- a/grub-core/fs/ntfs.c +++ b/grub-core/fs/ntfs.c @@ -948,9 +948,9 @@ grub_ntfs_mount (grub_disk_t disk) if (grub_memcmp ((char *) &bpb.oem_name, "NTFS", 4)) goto fail; - data->spc = (bpb.sectors_per_cluster - * (grub_le_to_cpu16 (bpb.bytes_per_sector) - >> GRUB_NTFS_BLK_SHR)); + data->spc = (((grub_uint32_t) bpb.sectors_per_cluster + * (grub_uint32_t) grub_le_to_cpu16 (bpb.bytes_per_sector)) + >> GRUB_NTFS_BLK_SHR); if (bpb.clusters_per_mft > 0) data->mft_size = data->spc * bpb.clusters_per_mft;