diff options
| author | Lioncash <mathew1800@gmail.com> | 2019-03-29 18:01:38 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2019-03-29 18:16:19 -0400 |
| commit | c6147a439d16112a0794b3fb98e825a9be864066 (patch) | |
| tree | 5471089bf0b6b0b58517325fef2c6b0a634ac9cc /src/core/hle/kernel/svc.cpp | |
| parent | f770c17d011e76cb268df5ba5d687609a0f514d4 (diff) | |
kernel/shared_memory: Sanitize supplied size when unmapping
The kernel makes sure that the given size to unmap is always the same
size as the entire region managed by the shared memory instance,
otherwise it returns an error code signifying an invalid size.
This is similarly done for transfer memory (which we already check for).
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
| -rw-r--r-- | src/core/hle/kernel/svc.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index 11796e5e5..fd98c0825 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp @@ -1140,7 +1140,7 @@ static ResultCode UnmapSharedMemory(Handle shared_memory_handle, VAddr addr, u64 return ERR_INVALID_MEMORY_RANGE; } - return shared_memory->Unmap(*current_process, addr); + return shared_memory->Unmap(*current_process, addr, size); } static ResultCode QueryProcessMemory(VAddr memory_info_address, VAddr page_info_address, |
