grub-devel
[Top][All Lists]
Advanced

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

[PATCH] Silently ignore grub_file_read when p_filesz == 0


From: Kalamatee
Subject: [PATCH] Silently ignore grub_file_read when p_filesz == 0
Date: Fri, 21 Mar 2008 11:29:31 +0000

After reading through the ELF specs (http://www.muppetlabs.com/~breadbox/software/ELF.txt) its become clear that a PT_LOAD with p_filesz == 0,is valid - and after checking some elf binaries ive found a number of cases where this is true (including the bootstrap of AROS64)
 
please find a patch enclosed to change the behaviour of multiboot.c's elf loader to silently ignore loading the data if p_filesz == 0
 
2008-03-21  Kalamatee address@hidden

        * loader/i386/pc/multiboot.c
        (grub_multiboot_load_elf32): If p_filesz == 0, do not attempt to read data from the file.
        (grub_multiboot_load_elf64): If p_filesz == 0, do not attempt to read data from the file.
 

Attachment: multiboot.diff
Description: Binary data


reply via email to

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