diff options
author | RSDuck <RSDuck@users.noreply.github.com> | 2020-08-25 18:13:17 +0200 |
---|---|---|
committer | RSDuck <RSDuck@users.noreply.github.com> | 2020-08-25 18:13:17 +0200 |
commit | b12e1a1b6e2c983f522ef1369a6bfb8167b1bf4c (patch) | |
tree | 52eae4f254b4c2da5f44c7c5658bc171f7c18a8c /src | |
parent | 4be68aafe081ffbd254c2e14b85ed0cb9faa6e6c (diff) |
JIT fastmem: fix out of bounds read
seems to fix #727
Diffstat (limited to 'src')
-rw-r--r-- | src/ARMJIT_Memory.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ARMJIT_Memory.cpp b/src/ARMJIT_Memory.cpp index 7885fb7..c5c8f04 100644 --- a/src/ARMJIT_Memory.cpp +++ b/src/ARMJIT_Memory.cpp @@ -524,8 +524,8 @@ bool MapAtAddress(u32 addr) { u32 sectionOffset = offset; bool hasCode = isExecutable && ARMJIT::PageContainsCode(&range[offset / 512]); - while ((!isExecutable || ARMJIT::PageContainsCode(&range[offset / 512]) == hasCode) - && offset < mirrorSize + while (offset < mirrorSize + && (!isExecutable || ARMJIT::PageContainsCode(&range[offset / 512]) == hasCode) && (!skipDTCM || mirrorStart + offset != NDS::ARM9->DTCMBase)) { assert(states[(mirrorStart + offset) >> 12] == memstate_Unmapped); |