ELF loading potential out-of-bounds fix

This commit is contained in:
Henrik Rydgård committed 2017-06-07 00:22:37 +02:00
1 parent b1b3b7c9d7
commit 42bdf3e19b
2 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -1153,7 +1153,7 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 loadAdd
module->Cleanup();
kernelObjects.Destroy<Module>(module->GetUID());
error = SCE_KERNEL_ERROR_UNSUPPORTED_PRX_TYPE;
return 0;
return nullptr;
}
// Open ELF reader
@@ -1167,7 +1167,7 @@ static Module *__KernelLoadELFFromPtr(const u8 *ptr, size_t elfSize, u32 loadAdd
module->Cleanup();
kernelObjects.Destroy<Module>(module->GetUID());
error = result;
return 0;
return nullptr;
}
module->memoryBlockAddr = reader.GetVaddr();
module->memoryBlockSize = reader.GetTotalSize();