mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 07:12:39 +00:00
* grub-core/fs/affs.c (grub_affs_read_block): Fix theoretical overflow.
This commit is contained in:
1 parent
83b2e89cf7
commit
62ace64dd9
2 files changed
+6
-2
No files matched your search
+2
-2
@@ -129,8 +129,8 @@ grub_affs_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
||||
|
||||
if (!node->block_cache)
|
||||
{
|
||||
node->block_cache = grub_malloc ((((grub_be_to_cpu32 (node->di.size)
|
||||
+ 511) >> 9) / data->htsize + 1)
|
||||
node->block_cache = grub_malloc (((grub_be_to_cpu32 (node->di.size)
|
||||
>> 9) / data->htsize + 2)
|
||||
* sizeof (node->block_cache[0]));
|
||||
if (!node->block_cache)
|
||||
return -1;
|
||||
|
||||
Reference in new issue
Block a user