diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2008-04-21 17:17:36 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2008-04-21 17:17:36 +0400 |
commit | 2bc35e62995c59872a7aec8367934a37b3b786d9 (patch) | |
tree | 3ea3723c6134d76660aa8a4c44c2eb1258e5cf5a /winsup/cygwin | |
parent | abbde487046d0f1a775a85057d51ec4ee074e33d (diff) |
* kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/kernel32.cc | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index d36d11f41..117839c51 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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. * autoload.cc (WSACloseEvent): Remove. diff --git a/winsup/cygwin/kernel32.cc b/winsup/cygwin/kernel32.cc index f8953327d..525432a00 100644 --- a/winsup/cygwin/kernel32.cc +++ b/winsup/cygwin/kernel32.cc @@ -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 (§, access, &attr, psize, prot, attribs, hFile); |