mirror of
https://github.com/reactos/reactos.git
synced 2025-01-07 14:51:00 +00:00
[KERNEL32]: Fix a bug when converting EXECUTE access.
svn path=/trunk/; revision=54339
This commit is contained in:
parent
b25b405747
commit
6fc023d62d
1 changed files with 7 additions and 4 deletions
|
@ -314,11 +314,14 @@ OpenFileMappingW(IN DWORD dwDesiredAccess,
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue