LibELF: Allow using ELF::Loader for ET_CORE objects
This commit is contained in:
parent
5a2e68d699
commit
50219429fd
Notes:
sideshowbarker
2024-07-19 00:50:52 +09:00
Author: https://github.com/itamar8910 Commit: https://github.com/SerenityOS/serenity/commit/50219429fdf Pull-request: https://github.com/SerenityOS/serenity/pull/3738 Reviewed-by: https://github.com/ADKaster Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/awesomekling
1 changed files with 1 additions and 1 deletions
|
@ -163,7 +163,7 @@ bool validate_elf_header(const Elf32_Ehdr& elf_header, size_t file_size, bool ve
|
|||
return false;
|
||||
}
|
||||
|
||||
if (elf_header.e_shstrndx >= elf_header.e_shnum) {
|
||||
if (elf_header.e_shstrndx != SHN_UNDEF && elf_header.e_shstrndx >= elf_header.e_shnum) {
|
||||
if (verbose)
|
||||
dbgprintf("SHENANIGANS! Section header string table index (%d) is not a valid index given we have %d section headers!\n", elf_header.e_shstrndx, elf_header.e_shnum);
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue