vm: fix virtualQuery with invalid address

This commit is contained in:
DH 2024-11-03 18:43:15 +03:00
parent d7a5bbcc57
commit 5682a350a4

View file

@ -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()) {