mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 22:28:45 +00:00
return error code if sceKernelLoadStartModule module is invalid
This commit is contained in:
parent
95340f578f
commit
f413ec09df
1 changed files with 3 additions and 0 deletions
|
@ -178,6 +178,9 @@ s32 PS4_SYSV_ABI sceKernelLoadStartModule(const char* moduleFileName, size_t arg
|
||||||
// Load PRX module and relocate any modules that import it.
|
// Load PRX module and relocate any modules that import it.
|
||||||
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
auto* linker = Common::Singleton<Core::Linker>::Instance();
|
||||||
u32 handle = linker->LoadModule(path);
|
u32 handle = linker->LoadModule(path);
|
||||||
|
if (handle == -1) {
|
||||||
|
return ORBIS_KERNEL_ERROR_EINVAL;
|
||||||
|
}
|
||||||
auto* module = linker->GetModule(handle);
|
auto* module = linker->GetModule(handle);
|
||||||
linker->RelocateAnyImports(module);
|
linker->RelocateAnyImports(module);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue