summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRozlette <Uberpanzermensch@gmail.com>2018-01-20 21:56:15 +0100
committerRozlette <Uberpanzermensch@gmail.com>2018-01-20 21:56:15 +0100
commitde7aa3106adcdc14ed5e09c653133115a83e512a (patch)
tree839f7e9c5c07f73b2eac85b5dcc4b4ab75f68796
parentPort citra #3352 to yuzu (#103) (diff)
downloadyuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar.gz
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar.bz2
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar.lz
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar.xz
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.tar.zst
yuzu-de7aa3106adcdc14ed5e09c653133115a83e512a.zip
-rw-r--r--src/core/memory.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index 74a598852..a3d2d4951 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -219,6 +219,9 @@ void Write(const VAddr vaddr, const T data) {
bool IsValidVirtualAddress(const Kernel::Process& process, const VAddr vaddr) {
auto& page_table = process.vm_manager.page_table;
+ if ((vaddr >> PAGE_BITS) >= PAGE_TABLE_NUM_ENTRIES)
+ return false;
+
const u8* page_pointer = page_table.pointers[vaddr >> PAGE_BITS];
if (page_pointer)
return true;