j
: Next unread message k
: Previous unread message j a
: Jump to all threads
j l
: Jump to MailingList overview
Author: blueswirl Date: 2009-01-09 20:43:39 +0100 (Fri, 09 Jan 2009) New Revision: 373
Modified: openbios-devel/fs/grubfs/grubfs_fs.c Log: grubfs: don't try to read a file beyond its end
Yaboot relies on the read function from openbios to stop reading at the end of a file. This patch makes sure to not read beyond the end of the file. This fixes the boot of debian-installer using a CD-ROM.
Signed-off-by: Aurelien Jarno aurelien@aurel32.net
Modified: openbios-devel/fs/grubfs/grubfs_fs.c =================================================================== --- openbios-devel/fs/grubfs/grubfs_fs.c 2009-01-08 15:14:33 UTC (rev 372) +++ openbios-devel/fs/grubfs/grubfs_fs.c 2009-01-09 19:43:39 UTC (rev 373) @@ -161,6 +161,9 @@ filepos=file->pos; filemax=file->len;
+ if (count > filemax - filepos) + count = filemax - filepos; + ret=curfs->fsys->read_func(buf, count);
file->pos=filepos;