Tim Clem : wow64: Truncate too-large regions from NtQueryVirtualMemory(MemoryRegionInformation).
Module: wine Branch: master Commit: 06321ba57b17635cf2bd945ce38d2c95367b2156 URL: https://gitlab.winehq.org/wine/wine/-/commit/06321ba57b17635cf2bd945ce38d2c9... Author: Tim Clem <tclem(a)codeweavers.com> Date: Tue Nov 8 13:51:40 2022 -0800 wow64: Truncate too-large regions from NtQueryVirtualMemory(MemoryRegionInformation). AllocationBase + RegionSize should not exceed the highest WoW user address. --- dlls/wow64/virtual.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/wow64/virtual.c b/dlls/wow64/virtual.c index f9a0e0b6bc8..c41d0a930ca 100644 --- a/dlls/wow64/virtual.c +++ b/dlls/wow64/virtual.c @@ -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);
participants (1)
-
Alexandre Julliard