grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [RFT, PATCH] Fix file->offset handling


From: Vladimir 'phcoder' Serbinenko
Subject: Re: [RFT, PATCH] Fix file->offset handling
Date: Fri, 28 Aug 2009 18:29:56 +0200

On Mon, Aug 17, 2009 at 3:34 PM, Robert Millan<address@hidden> wrote:
> On Fri, Aug 14, 2009 at 07:48:40PM +0200, Vladimir 'phcoder' Serbinenko wrote:
>> diff --git a/kern/file.c b/kern/file.c
>> index 9b56b88..85092b8 100644
>> --- a/kern/file.c
>> +++ b/kern/file.c
>> @@ -112,6 +112,12 @@ grub_file_read (grub_file_t file, void *buf, 
>> grub_size_t len)
>>  {
>>    grub_ssize_t res;
>>
>> +  if (file->offset > file->size)
>> +    {
>> +      grub_error (GRUB_ERR_OUT_OF_RANGE, "Bad offset");
>> +      return -1;
>> +    }
>
> This could be a bit more descriptive (e.g. "Offset exceeds file size"), maybe
> even indicate the sizes and/or filename.
>
Fixed and comitted
> --
> Robert Millan
>
>  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
>  how) you may access your data; but nobody's threatening your freedom: we
>  still allow you to remove your data and not access it at all."
>
>
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Regards
Vladimir 'phcoder' Serbinenko

Personal git repository: http://repo.or.cz/w/grub2/phcoder.git




reply via email to

[Prev in Thread] Current Thread [Next in Thread]