1
0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2025-02-09 20:04:47 +01:00

memory: Return false for large VAddr in IsValidVirtualAddress

This commit is contained in:
Rozlette 2018-01-20 14:56:15 -06:00
parent c8a094e164
commit de7aa3106a

@ -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;