[ros-diffs] [ion] 54339: [KERNEL32]: Fix a bug when converting EXECUTE access.

ion at svn.reactos.org ion at svn.reactos.org
Mon Nov 7 17:49:10 UTC 2011


Author: ion
Date: Mon Nov  7 17:49:10 2011
New Revision: 54339

URL: http://svn.reactos.org/svn/reactos?rev=54339&view=rev
Log:
[KERNEL32]: Fix a bug when converting EXECUTE access.

Modified:
    trunk/reactos/dll/win32/kernel32/client/file/filemap.c

Modified: trunk/reactos/dll/win32/kernel32/client/file/filemap.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/file/filemap.c?rev=54339&r1=54338&r2=54339&view=diff
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/filemap.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/filemap.c [iso-8859-1] Mon Nov  7 17:49:10 2011
@@ -314,11 +314,14 @@
                                NULL);
 
     /* Convert COPY to READ */
-    if (dwDesiredAccess == FILE_MAP_COPY) dwDesiredAccess = SECTION_MAP_READ;
-
-    /* Fixup execute */
-    if (dwDesiredAccess == FILE_MAP_EXECUTE)
-    {
+    if (dwDesiredAccess == FILE_MAP_COPY)
+    {
+        /* Fixup copy */
+        dwDesiredAccess = SECTION_MAP_READ;
+    }
+    else if (dwDesiredAccess & FILE_MAP_EXECUTE)
+    {
+        /* Fixup execute */
         dwDesiredAccess = (dwDesiredAccess & ~FILE_MAP_EXECUTE) | SECTION_MAP_EXECUTE;
     }
 




More information about the Ros-diffs mailing list