summaryrefslogtreecommitdiff
path: root/Libraries/LibELF
diff options
context:
space:
mode:
authorAndrew Kaster <andrewdkaster@gmail.com>2020-04-11 11:20:16 -0600
committerAndreas Kling <kling@serenityos.org>2020-04-11 19:32:28 +0200
commitf8092317180bd78ef94134ba236b9163de20c359 (patch)
treebd19459d142ae33c484f42bac1c70bebbde03d68 /Libraries/LibELF
parentc199b0e1aa83c177ceee17db1b5d9a7401ef2273 (diff)
downloadserenity-f8092317180bd78ef94134ba236b9163de20c359.zip
LibELF: Return false instead of assert on unrecognized program header
Diffstat (limited to 'Libraries/LibELF')
-rw-r--r--Libraries/LibELF/ELFImage.cpp5
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;