* grub-core/fs/bfs.c (mount): Improve filesystem detection reliability.
* grub-core/fs/ext2.c (grub_ext2_mount): Likewise. * grub-core/fs/hfs.c (grub_hfs_mount): Likewise. * grub-core/fs/hfsplus.c (grub_hfsplus_mount): Likewise. * grub-core/fs/jfs.c (grub_jfs_mount): Likewise. * grub-core/fs/minix.c (grub_minix_mount): Likewise. * grub-core/fs/ntfs.c (grub_ntfs_mount): Likewise. * grub-core/fs/romfs.c (grub_romfs_mount): Likewise. * grub-core/fs/xfs.c (grub_xfs_mount): Likewise.
This commit is contained in:
parent
fe8c2f1117
commit
2e57f28fc7
10 changed files with 63 additions and 18 deletions
|
@ -366,8 +366,10 @@ grub_jfs_mount (grub_disk_t disk)
|
|||
goto fail;
|
||||
}
|
||||
|
||||
if (grub_le_to_cpu32 (data->sblock.blksz)
|
||||
!= (1U << grub_le_to_cpu16 (data->sblock.log2_blksz)))
|
||||
if (data->sblock.blksz == 0
|
||||
|| grub_le_to_cpu32 (data->sblock.blksz)
|
||||
!= (1U << grub_le_to_cpu16 (data->sblock.log2_blksz))
|
||||
|| grub_le_to_cpu16 (data->sblock.log2_blksz) < GRUB_DISK_SECTOR_BITS)
|
||||
{
|
||||
grub_error (GRUB_ERR_BAD_FS, "not a JFS filesystem");
|
||||
goto fail;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue