summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-10-20 14:55:39 -0400
committerLioncash <mathew1800@gmail.com>2018-10-20 14:56:51 -0400
commit896c0f61a0e31c3b37b9a9ba30788bdad6d2731e (patch)
tree3867d1d1fb11c9cd902830fd8dd2461ad14e55dd /src/core
parent8dc7db7e33ff47700d0d08c9d20f0b47a0b9622b (diff)
svc: Fix vma boundary check in svcQueryMemory
This should be comparing against the queried process' vma_map, not the current process'. The only reason this hasn't become an issue yet is we currently only handle one process being active at any time.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/kernel/svc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 3b8a2e230..690b84930 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -654,7 +654,7 @@ static ResultCode QueryProcessMemory(MemoryInfo* memory_info, PageInfo* /*page_i
}
auto vma = process->VMManager().FindVMA(addr);
memory_info->attributes = 0;
- if (vma == Core::CurrentProcess()->VMManager().vma_map.end()) {
+ if (vma == process->VMManager().vma_map.end()) {
memory_info->base_address = 0;
memory_info->permission = static_cast<u32>(VMAPermission::None);
memory_info->size = 0;