summaryrefslogtreecommitdiff
path: root/Source/Kernel/Linker/ElfBinary.class.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/Linker/ElfBinary.class.cpp')
-rw-r--r--Source/Kernel/Linker/ElfBinary.class.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Kernel/Linker/ElfBinary.class.cpp b/Source/Kernel/Linker/ElfBinary.class.cpp
index 27e5474..0518c38 100644
--- a/Source/Kernel/Linker/ElfBinary.class.cpp
+++ b/Source/Kernel/Linker/ElfBinary.class.cpp
@@ -9,7 +9,7 @@ ElfBinary::~ElfBinary() {
Binary* ElfBinary::load(File& file) {
elf_ehdr_t hdr;
- file.read<elf_ehdr_t> (&hdr);
+ if (!file.read<elf_ehdr_t> (&hdr)) return 0;
//Verify we have an elf file
if (hdr.e_ident[0] != 0x7F or hdr.e_ident[1] != 'E' or hdr.e_ident[2] != 'L' or hdr.e_ident[3] != 'F') return 0;