Check e_ident of elf header

This commit is contained in:
Kingcom committed 2013-10-05 10:05:55 +02:00
1 parent 424a24366c
commit 7f1fca8e74
3 files changed
+19 -20

No files matched your search

+3 -2
View File
@@ -736,8 +736,9 @@ Module *__KernelLoadELFFromPtr(const u8 *ptr, u32 loadAddress, std::string *erro
// Open ELF reader
ElfReader reader((void*)ptr);
if (!reader.LoadInto(loadAddress)) {
ERROR_LOG(SCEMODULE, "LoadInto failed");
int result = reader.LoadInto(loadAddress);
if (result != SCE_KERNEL_ERROR_OK) {
ERROR_LOG(SCEMODULE, "LoadInto failed with error %08x",result);
if (newptr)
delete [] newptr;
module->Cleanup();