Commit 06321ba5 authored by Tim Clem's avatar Tim Clem Committed by Alexandre Julliard

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

AllocationBase + RegionSize should not exceed the highest WoW user address.
parent 62fbfe87
......@@ -444,6 +444,8 @@ NTSTATUS WINAPI wow64_NtQueryVirtualMemory( UINT *args )
info32->CommitSize = info.CommitSize;
info32->PartitionId = info.PartitionId;
info32->NodePreference = info.NodePreference;
if ((ULONG_PTR)info.AllocationBase + info.RegionSize > highest_user_address)
info32->RegionSize = highest_user_address - (ULONG_PTR)info.AllocationBase + 1;
}
}
res_len = sizeof(MEMORY_REGION_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