diff options
author | Andrew Kaster <andrewdkaster@gmail.com> | 2020-04-11 11:20:16 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-11 19:32:28 +0200 |
commit | f8092317180bd78ef94134ba236b9163de20c359 (patch) | |
tree | bd19459d142ae33c484f42bac1c70bebbde03d68 /Libraries/LibELF | |
parent | c199b0e1aa83c177ceee17db1b5d9a7401ef2273 (diff) | |
download | serenity-f8092317180bd78ef94134ba236b9163de20c359.zip |
LibELF: Return false instead of assert on unrecognized program header
Diffstat (limited to 'Libraries/LibELF')
-rw-r--r-- | Libraries/LibELF/ELFImage.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Libraries/LibELF/ELFImage.cpp b/Libraries/LibELF/ELFImage.cpp index a2bff5b2ce..6ae75963fd 100644 --- a/Libraries/LibELF/ELFImage.cpp +++ b/Libraries/LibELF/ELFImage.cpp @@ -407,9 +407,8 @@ bool ELFImage::validate_program_headers(const Elf32_Ehdr& elf_header, size_t fil break; default: // Not handling other program header types in other code so... let's not surprise them - dbgprintf("Found program header (%d) of unrecognized type %d!\n", header_index, program_header.p_type); - ASSERT_NOT_REACHED(); - break; + dbgprintf("Found program header (%d) of unrecognized type %x!\n", header_index, program_header.p_type); + return false; } } return true; |