aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/shared_memory.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-04-03 11:48:11 -0400
committerGitHub <noreply@github.com>2019-04-03 11:48:11 -0400
commit580e3564c9f2cac47b39fc5c3214271cff0648fb (patch)
tree88175f150482c61d8d53ef7813956455ce4aac5a /src/core/hle/kernel/shared_memory.h
parent74a4a5047017f9ed01d7139a1e6aee258382b91d (diff)
parent108be41316cc58c191f525e816d2a33404ab41a0 (diff)
Merge pull request #2305 from lioncash/shared
kernel/shared_memory: Sanitize supplied size when unmapping
Diffstat (limited to 'src/core/hle/kernel/shared_memory.h')
-rw-r--r--src/core/hle/kernel/shared_memory.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h
index dab2a6bea..37e18c443 100644
--- a/src/core/hle/kernel/shared_memory.h
+++ b/src/core/hle/kernel/shared_memory.h
@@ -104,11 +104,17 @@ public:
/**
* Unmaps a shared memory block from the specified address in system memory
+ *
* @param target_process Process from which to unmap the memory block.
- * @param address Address in system memory where the shared memory block is mapped
+ * @param address Address in system memory where the shared memory block is mapped.
+ * @param unmap_size The amount of bytes to unmap from this shared memory instance.
+ *
* @return Result code of the unmap operation
+ *
+ * @pre The given size to unmap must be the same size as the amount of memory managed by
+ * the SharedMemory instance itself, otherwise ERR_INVALID_SIZE will be returned.
*/
- ResultCode Unmap(Process& target_process, VAddr address);
+ ResultCode Unmap(Process& target_process, VAddr address, u64 unmap_size);
/**
* Gets a pointer to the shared memory block