* kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.

This commit is contained in:
Corinna Vinschen
2008-04-21 13:17:36 +00:00
parent abbde48704
commit 2bc35e6299
2 changed files with 7 additions and 3 deletions

View File

@ -331,8 +331,8 @@ CreateFileMappingW (HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes,
lpAttributes
? lpAttributes->lpSecurityDescriptor
: NULL);
if (!attribs)
attribs = SEC_COMMIT;
if (!(attribs & (SEC_RESERVE | SEC_COMMIT)))
attribs |= SEC_COMMIT;
if (hFile == INVALID_HANDLE_VALUE)
hFile = NULL;
status = NtCreateSection (&sect, access, &attr, psize, prot, attribs, hFile);