summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index 55ce0236f..c7f5140f4 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -1309,6 +1309,8 @@ static ResultCode SetProcessMemoryPermission(Core::System& system, Handle proces
1309 R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize); 1309 R_UNLESS(Common::IsAligned(size, PageSize), ResultInvalidSize);
1310 R_UNLESS(size > 0, ResultInvalidSize); 1310 R_UNLESS(size > 0, ResultInvalidSize);
1311 R_UNLESS((address < address + size), ResultInvalidCurrentMemory); 1311 R_UNLESS((address < address + size), ResultInvalidCurrentMemory);
1312 R_UNLESS(address == static_cast<uintptr_t>(address), ResultInvalidCurrentMemory);
1313 R_UNLESS(size == static_cast<size_t>(size), ResultInvalidCurrentMemory);
1312 1314
1313 // Validate the memory permission. 1315 // Validate the memory permission.
1314 R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission); 1316 R_UNLESS(IsValidProcessMemoryPermission(perm), ResultInvalidNewMemoryPermission);
@@ -1323,7 +1325,7 @@ static ResultCode SetProcessMemoryPermission(Core::System& system, Handle proces
1323 R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory); 1325 R_UNLESS(page_table.Contains(address, size), ResultInvalidCurrentMemory);
1324 1326
1325 // Set the memory permission. 1327 // Set the memory permission.
1326 return page_table.SetProcessMemoryPermission(address, size, ConvertToKMemoryPermission(perm)); 1328 return page_table.SetProcessMemoryPermission(address, size, perm);
1327} 1329}
1328 1330
1329static ResultCode MapProcessMemory(Core::System& system, VAddr dst_address, Handle process_handle, 1331static ResultCode MapProcessMemory(Core::System& system, VAddr dst_address, Handle process_handle,