mirror of
git://source.winehq.org/git/wine.git
synced 2024-07-21 12:24:10 +00:00
wow64: Truncate too-large regions from NtQueryVirtualMemory(MemoryRegionInformation).
AllocationBase + RegionSize should not exceed the highest WoW user address.
This commit is contained in:
parent
62fbfe8761
commit
06321ba57b
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue