mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-21 05:05:48 +00:00
Fix #6921 - FPE on ext2 filesystem
This commit is contained in:
parent
9c870ef165
commit
6b515cae6a
@ -523,7 +523,11 @@ grub_ext2_read_inode (struct grub_ext2_data *data,
|
||||
if (grub_errno)
|
||||
return grub_errno;
|
||||
|
||||
inodes_per_block = EXT2_BLOCK_SIZE (data) / EXT2_INODE_SIZE (data);
|
||||
int inode_size = EXT2_INODE_SIZE (data);
|
||||
if (inode_size < 1) {
|
||||
return grub_errno = GRUB_ERR_BAD_FS;
|
||||
}
|
||||
inodes_per_block = EXT2_BLOCK_SIZE (data) / inode_size;
|
||||
if (inodes_per_block < 1) {
|
||||
return grub_errno = GRUB_ERR_BAD_FS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user