2009-08-28 Vladimir Serbinenko <phcoder@gmail.com>
* kern/file.c (grub_file_read): Check offset. * fs/hfs.c (grub_hfs_read_file): Remove unnecessary offset check. * fs/jfs.c (grub_jfs_read_file): Likewise. * fs/ntfs.c (grub_ntfs_read): Likewise. * fs/reiserfs.c (grub_reiserfs_read): Likewise. * fs/minix.c (grub_minix_read_file): Correct offset check. * fs/ufs.c (grub_ufs_read_file): Likewise.
This commit is contained in:
parent
b4f34077c8
commit
6f07b921bc
8 changed files with 21 additions and 24 deletions
4
fs/jfs.c
4
fs/jfs.c
|
@ -544,10 +544,6 @@ grub_jfs_read_file (struct grub_jfs_data *data,
|
|||
int i;
|
||||
int blockcnt;
|
||||
|
||||
/* Adjust len so it we can't read past the end of the file. */
|
||||
if (len > data->currinode.size)
|
||||
len = data->currinode.size;
|
||||
|
||||
blockcnt = ((len + pos + grub_le_to_cpu32 (data->sblock.blksz) - 1)
|
||||
/ grub_le_to_cpu32 (data->sblock.blksz));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue