mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
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:
1 parent
b4f34077c8
commit
6f07b921bc
8 files changed
+21
-24
No files matched your search
+2
-2
@@ -193,8 +193,8 @@ grub_minix_read_file (struct grub_minix_data *data,
|
||||
int blockcnt;
|
||||
|
||||
/* Adjust len so it we can't read past the end of the file. */
|
||||
if (len > GRUB_MINIX_INODE_SIZE (data))
|
||||
len = GRUB_MINIX_INODE_SIZE (data);
|
||||
if (len + pos > GRUB_MINIX_INODE_SIZE (data))
|
||||
len = GRUB_MINIX_INODE_SIZE (data) - pos;
|
||||
|
||||
blockcnt = (len + pos + GRUB_MINIX_BSIZE - 1) / GRUB_MINIX_BSIZE;
|
||||
|
||||
|
||||
Reference in new issue
Block a user