Commit 245e21b2 authored by Vladimir Serbinenko's avatar Vladimir Serbinenko
Browse files

grub_ufs_mount: Check that sblock.ino_per_group is not 0.

parent 9201cd79
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/fs/ufs.c (grub_ufs_mount): Check
that sblock.ino_per_group is not 0.
2015-01-20 Vladimir Serbinenko <phcoder@gmail.com>
 
Reject NILFS2 superblocks with over 1GiB blocks.
......@@ -604,7 +604,8 @@ grub_ufs_mount (grub_disk_t disk)
endiannesses. */
if (data->sblock.magic == grub_cpu_to_ufs32_compile_time (GRUB_UFS_MAGIC)
&& data->sblock.bsize != 0
&& ((data->sblock.bsize & (data->sblock.bsize - 1)) == 0))
&& ((data->sblock.bsize & (data->sblock.bsize - 1)) == 0)
&& data->sblock.ino_per_group != 0)
{
for (data->log2_blksz = 0;
(1U << data->log2_blksz) < grub_ufs_to_cpu32 (data->sblock.bsize);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment