From d2e29d81a9fb4f07485a6948c5bb04ff8c0a9c69 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 29 Mar 2011 10:56:14 +0200 Subject: [PATCH] * grub-core/fs/ext2.c (grub_ext2_read_inode): Fix an overflow. Reported and tested by: Timothy Nikkel. --- ChangeLog | 5 +++++ grub-core/fs/ext2.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c353b8fea..9e90df11e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-03-29 Vladimir Serbinenko + + * grub-core/fs/ext2.c (grub_ext2_read_inode): Fix an overflow. + Reported and tested by: Timothy Nikkel. + 2011-03-29 Vladimir Serbinenko * grub-core/term/gfxterm.c (dirty_region_add): Move core part to ... diff --git a/grub-core/fs/ext2.c b/grub-core/fs/ext2.c index ed5fafd4c..9d7bbfd36 100644 --- a/grub-core/fs/ext2.c +++ b/grub-core/fs/ext2.c @@ -555,7 +555,7 @@ grub_ext2_read_inode (struct grub_ext2_data *data, /* Read the inode. */ if (grub_disk_read (data->disk, - ((grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno) + (((grub_disk_addr_t) grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno) << LOG2_EXT2_BLOCK_SIZE (data)), EXT2_INODE_SIZE (data) * blkoff, sizeof (struct grub_ext2_inode), inode))