* 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

@ -1,4 +1,8 @@
2008-04-20 Corinna Vinschen <corinna@vinschen.de> 2008-04-21 Corinna Vinschen <corinna@vinschen.de>
* kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.
2008-04-21 Corinna Vinschen <corinna@vinschen.de>
* Makefile.in (DLL_OFILES): Add kernel32.o. * Makefile.in (DLL_OFILES): Add kernel32.o.
* autoload.cc (WSACloseEvent): Remove. * autoload.cc (WSACloseEvent): Remove.

View File

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