Commit 2f88259a authored by Felix Münchhalfen's avatar Felix Münchhalfen Committed by Alexandre Julliard

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

parent f5c00e38
......@@ -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;
......
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