Skip to content

Commit

Permalink
vm: fix virtualQuery with invalid address
Browse files Browse the repository at this point in the history
  • Loading branch information
DHrpcs3 committed Nov 3, 2024
1 parent d7a5bbc commit 5682a35
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rpcsx/vm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,10 @@ bool vm::virtualQuery(const void *addr, std::int32_t flags,
std::lock_guard lock(g_mtx);

auto address = reinterpret_cast<std::uint64_t>(addr);
if (address < kMinAddress || address >= kMaxAddress) {
return false;
}

auto it = gMapInfo.lowerBound(address);

if (it == gMapInfo.end()) {
Expand Down

0 comments on commit 5682a35

Please sign in to comment.