From a9b26dd565fa74f1e03f112526d191d6e0877580 Mon Sep 17 00:00:00 2001 From: Stephen Miller Date: Sun, 22 Jun 2025 11:30:12 -0500 Subject: [PATCH] Error if the module doesn't exist Fixes another thing kalaposfos found --- src/core/libraries/kernel/process.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/process.cpp b/src/core/libraries/kernel/process.cpp index 8a37e78d5..b8fbd4eca 100644 --- a/src/core/libraries/kernel/process.cpp +++ b/src/core/libraries/kernel/process.cpp @@ -118,11 +118,14 @@ s32 PS4_SYSV_ABI sceKernelGetModuleInfoForUnwind(VAddr addr, s32 flags, return ORBIS_OK; } -int PS4_SYSV_ABI sceKernelGetModuleInfoFromAddr(VAddr addr, int flags, +s32 PS4_SYSV_ABI sceKernelGetModuleInfoFromAddr(VAddr addr, s32 flags, Core::OrbisKernelModuleInfoEx* info) { LOG_INFO(Lib_Kernel, "called addr = {:#x}, flags = {:#x}", addr, flags); auto* linker = Common::Singleton::Instance(); auto* module = linker->FindByAddress(addr); + if (!module) { + return ORBIS_KERNEL_ERROR_EFAULT; + } *info = module->GetModuleInfoEx(); return ORBIS_OK; }