mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-19 11:43:56 +00:00
Fix region info query
This commit is contained in:
committed by
Maurice Heumann
parent
5a93462b45
commit
52d4e7e281
@@ -91,7 +91,7 @@ namespace syscalls
|
||||
return_length.write(sizeof(MEMORY_REGION_INFORMATION64));
|
||||
}
|
||||
|
||||
if (memory_information_length != sizeof(MEMORY_REGION_INFORMATION64))
|
||||
if (memory_information_length < sizeof(MEMORY_REGION_INFORMATION64))
|
||||
{
|
||||
return STATUS_BUFFER_OVERFLOW;
|
||||
}
|
||||
@@ -108,8 +108,8 @@ namespace syscalls
|
||||
memset(&image_info, 0, sizeof(image_info));
|
||||
|
||||
image_info.AllocationBase = reinterpret_cast<void*>(region_info.allocation_base);
|
||||
image_info.AllocationProtect = 0;
|
||||
image_info.PartitionId = 0;
|
||||
image_info.AllocationProtect = map_emulator_to_nt_protection(region_info.initial_permissions);
|
||||
// image_info.PartitionId = 0;
|
||||
image_info.RegionSize = static_cast<int64_t>(region_info.allocation_length);
|
||||
image_info.Reserved = 0x10;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user