mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-09-04 16:45:38 +00:00
Return error if dmem query address is too high (#3325)
Also adjusts the log message to align with how we log error returns in sceKernelVirtualQuery.
This commit is contained in:
parent
8b1b0fa0dc
commit
90705cbe51
1 changed files with 2 additions and 2 deletions
|
@ -740,8 +740,8 @@ s32 MemoryManager::DirectMemoryQuery(PAddr addr, bool find_next,
|
|||
dmem_area++;
|
||||
}
|
||||
|
||||
if (dmem_area->second.is_free) {
|
||||
LOG_ERROR(Core, "Unable to find allocated direct memory region to query!");
|
||||
if (dmem_area->second.is_free || addr >= total_direct_size) {
|
||||
LOG_WARNING(Kernel_Vmm, "Unable to find allocated direct memory region to query!");
|
||||
return ORBIS_KERNEL_ERROR_EACCES;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue