grub-devel
[Top][All Lists]
Advanced

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

grub_read_file with len==0


From: Hollis Blanchard
Subject: grub_read_file with len==0
Date: Fri, 03 Nov 2006 16:56:10 -0600

grub_read_file() has this in it:
        if (len == 0 || len > file->size - file->offset)
                len = file->size - file->offset;

This is a curious divergence from read(2), and bit me when loading an
ELF segment with 0 p_filesz but non-0 p_memsz.

Could we remove it? Why is it there in the first place?

-Hollis





reply via email to

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