2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
* fs/ext2.c (grub_ext2_read_block): Fix an integer overflow.
This commit is contained in:
parent
c6f2fe52f1
commit
c4d0b332c5
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/ext2.c (grub_ext2_read_block): Fix an integer overflow.
|
||||||
|
|
||||||
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-03-01 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Wait for user entry basing on presence of output rather than on errors.
|
Wait for user entry basing on presence of output rather than on errors.
|
||||||
|
|
|
@ -436,7 +436,8 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
||||||
grub_uint32_t indir[blksz / 4];
|
grub_uint32_t indir[blksz / 4];
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (inode->blocks.indir_block)
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (inode->blocks.indir_block))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
@ -452,13 +453,15 @@ grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
|
||||||
grub_uint32_t indir[blksz / 4];
|
grub_uint32_t indir[blksz / 4];
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (inode->blocks.double_indir_block)
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (inode->blocks.double_indir_block))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
if (grub_disk_read (data->disk,
|
if (grub_disk_read (data->disk,
|
||||||
grub_le_to_cpu32 (indir[rblock / perblock])
|
((grub_disk_addr_t)
|
||||||
|
grub_le_to_cpu32 (indir[rblock / perblock]))
|
||||||
<< log2_blksz,
|
<< log2_blksz,
|
||||||
0, blksz, indir))
|
0, blksz, indir))
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
Loading…
Reference in a new issue