Sebastian Lackner : ntdll: Fix status code when NtMapViewOfSection parameter check fails.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 8 07:49:55 CDT 2015


Module: wine
Branch: master
Commit: 8ddab2c2f47c53753aa69c588ba86dc9e22d8939
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8ddab2c2f47c53753aa69c588ba86dc9e22d8939

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Fri Jun  5 07:35:11 2015 +0200

ntdll: Fix status code when NtMapViewOfSection parameter check fails.

---

 dlls/kernel32/tests/virtual.c | 3 ---
 dlls/ntdll/virtual.c          | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index 15fc715..6082740 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -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 */
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 0629816..72309f6 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -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)
     {




More information about the wine-cvs mailing list