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/kernel32.cc | |
parent | abbde487046d0f1a775a85057d51ec4ee074e33d (diff) |
* kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.
Diffstat (limited to 'winsup/cygwin/kernel32.cc')
-rw-r--r-- | winsup/cygwin/kernel32.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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); |