mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 00:29:23 +00:00
Reject NILFS2 superblocks with over 1GiB blocks.
* grub-core/fs/nilfs2.c (grub_nilfs2_valid_sb): Check that block size is <= 1GiB.
This commit is contained in:
1 parent
f27ccb584c
commit
9201cd79a3
2 files changed
+11
No files matched your search
@@ -724,6 +724,10 @@ grub_nilfs2_valid_sb (struct grub_nilfs2_super_block *sbp)
|
||||
if (grub_le_to_cpu32 (sbp->s_rev_level) != NILFS_SUPORT_REV)
|
||||
return 0;
|
||||
|
||||
/* 20 already means 1GiB blocks. We don't want to deal with blocks overflowing int32. */
|
||||
if (grub_le_to_cpu32 (sbp->s_log_block_size) > 20)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user