Commit d47bdb3e authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

wow64: Truncate too-large regions from NtQueryVirtualMemory(MemoryBasicInformation).

BaseAddress + RegionSize should not exceed the highest WoW user address.
parent 464d3c86
......@@ -399,6 +399,8 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args )
info32->State = info.State;
info32->Protect = info.Protect;
info32->Type = info.Type;
if ((ULONG_PTR)info.BaseAddress + info.RegionSize > highest_user_address)
info32->RegionSize = highest_user_address - (ULONG_PTR)info.BaseAddress + 1;
}
}
res_len = sizeof(MEMORY_BASIC_INFORMATION32);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment