Commit 8ddab2c2 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

ntdll: Fix status code when NtMapViewOfSection parameter check fails.

parent 5204d89d
......@@ -1072,7 +1072,6 @@ static void test_NtMapViewOfSection(void)
size = 0;
offset.QuadPart = 1;
status = pNtMapViewOfSection( mapping, hProcess, &ptr2, 0, 0, &offset, &size, 1, 0, PAGE_READWRITE );
todo_wine
ok( status == STATUS_MAPPED_ALIGNMENT, "NtMapViewOfSection returned %x\n", status );
/* ptr has to be aligned */
......@@ -1080,7 +1079,6 @@ static void test_NtMapViewOfSection(void)
size = 0;
offset.QuadPart = 0;
status = pNtMapViewOfSection( mapping, hProcess, &ptr2, 0, 0, &offset, &size, 1, 0, PAGE_READWRITE );
todo_wine
ok( status == STATUS_MAPPED_ALIGNMENT, "NtMapViewOfSection returned %x\n", status );
/* still not 64k aligned */
......@@ -1088,7 +1086,6 @@ static void test_NtMapViewOfSection(void)
size = 0;
offset.QuadPart = 0;
status = pNtMapViewOfSection( mapping, hProcess, &ptr2, 0, 0, &offset, &size, 1, 0, PAGE_READWRITE );
todo_wine
ok( status == STATUS_MAPPED_ALIGNMENT, "NtMapViewOfSection returned %x\n", status );
/* zero_bits != 0 is not allowed when an address is set */
......
......@@ -2602,7 +2602,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
/* Check parameters */
if ((offset.u.LowPart & mask) || (*addr_ptr && ((UINT_PTR)*addr_ptr & mask)))
return STATUS_INVALID_PARAMETER;
return STATUS_MAPPED_ALIGNMENT;
switch(protect)
{
......
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