summaryrefslogtreecommitdiffstats
path: root/src/core/hle/svc.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-04-30 06:11:08 +0200
committerbunnei <bunneidev@gmail.com>2016-04-30 06:11:08 +0200
commit15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71 (patch)
tree1efaccc0d357f3f074938af586724a50bfea0469 /src/core/hle/svc.cpp
parentMerge pull request #1699 from mailwl/gpu-rights (diff)
parentac:u: stub CloseAsync; check memory size aling in svc:GetProcessInfo(type=2) (diff)
downloadyuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar.gz
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar.bz2
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar.lz
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar.xz
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.tar.zst
yuzu-15d21c0dc5213fb5f0fb71ca9ea90b8d4bb9eb71.zip
Diffstat (limited to 'src/core/hle/svc.cpp')
-rw-r--r--src/core/hle/svc.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index a9a1a3244..fb2aecbf2 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -859,6 +859,10 @@ static ResultCode GetProcessInfo(s64* out, Handle process_handle, u32 type) {
// TODO(yuriks): Type 0 returns a slightly higher number than type 2, but I'm not sure
// what's the difference between them.
*out = process->heap_used + process->linear_heap_used + process->misc_memory_used;
+ if(*out % Memory::PAGE_SIZE != 0) {
+ LOG_ERROR(Kernel_SVC, "called, memory size not page-aligned");
+ return ERR_MISALIGNED_SIZE;
+ }
break;
case 1:
case 3: