mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-27 20:44:28 +00:00
Proper error behavior in QueryProtection
Might as well handle this properly while I'm here.
This commit is contained in:
parent
4af6bb099f
commit
049976057c
@ -528,7 +528,10 @@ int MemoryManager::QueryProtection(VAddr addr, void** start, void** end, u32* pr
|
||||
|
||||
const auto it = FindVMA(addr);
|
||||
const auto& vma = it->second;
|
||||
ASSERT_MSG(vma.type != VMAType::Free, "Provided address is not mapped");
|
||||
if (!vma.Contains(addr, 0) || vma.IsFree()) {
|
||||
LOG_ERROR(Kernel_Vmm, "Address {:#x} is not mapped", addr);
|
||||
return ORBIS_KERNEL_ERROR_EACCES;
|
||||
}
|
||||
|
||||
if (start != nullptr) {
|
||||
*start = reinterpret_cast<void*>(vma.base);
|
||||
|
Loading…
Reference in New Issue
Block a user