diff options
| author | bunnei <bunneidev@gmail.com> | 2018-02-02 08:59:45 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-02 08:59:45 -0800 |
| commit | b5846ac67dd5d84ef23bf2244ec75fdefb4282d9 (patch) | |
| tree | 85fc8ced6cc673f57a8c410e791e026d06be44dd /src/core/hle/kernel/shared_memory.cpp | |
| parent | 3dbe6293969cc8c0fdf62249d669ade2b84e8233 (diff) | |
| parent | cd0befbd052940af0760aa1bcab73efcf0c98795 (diff) | |
Merge pull request #152 from shinyquagsire23/sharedmem-valid-bounds
shared_memory: Only mark addresses as invalid if they are within the heap
Diffstat (limited to 'src/core/hle/kernel/shared_memory.cpp')
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 7279366ec8..f8aa429dcd 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -136,7 +136,8 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi // can not map it in its own address space unless it was created with addr=0, result 0xD900182C. if (address != 0) { - if (address < Memory::HEAP_VADDR) { + // TODO(shinyquagsire23): Check for virtual/mappable memory here too? + if (address >= Memory::HEAP_VADDR && address < Memory::HEAP_VADDR_END) { LOG_ERROR(Kernel, "cannot map id=%u, address=0x%llx name=%s, invalid address", GetObjectId(), address, name.c_str()); return ERR_INVALID_ADDRESS; |
