1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

ntdll: Use pagesize alignment if MEM_REPLACE_PLACEHOLDER is set in flags of NtMapViewOfSection(Ex).

This commit is contained in:
Felix Münchhalfen 2024-01-10 20:43:34 +01:00 committed by Alexandre Julliard
parent f5c00e3870
commit 2f88259a44

View file

@ -5466,6 +5466,9 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
}
#endif
if (alloc_type & MEM_REPLACE_PLACEHOLDER)
mask = page_mask;
if ((offset.u.LowPart & mask) || (*addr_ptr && ((UINT_PTR)*addr_ptr & mask)))
return STATUS_MAPPED_ALIGNMENT;
@ -5535,6 +5538,9 @@ NTSTATUS WINAPI NtMapViewOfSectionEx( HANDLE handle, HANDLE process, PVOID *addr
}
#endif
if (alloc_type & MEM_REPLACE_PLACEHOLDER)
mask = page_mask;
if ((offset.u.LowPart & mask) || (*addr_ptr && ((UINT_PTR)*addr_ptr & mask)))
return STATUS_MAPPED_ALIGNMENT;