Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-04-21 17:17:36 +0400
committerCorinna Vinschen <corinna@vinschen.de>2008-04-21 17:17:36 +0400
commit2bc35e62995c59872a7aec8367934a37b3b786d9 (patch)
tree3ea3723c6134d76660aa8a4c44c2eb1258e5cf5a /winsup/cygwin/kernel32.cc
parentabbde487046d0f1a775a85057d51ec4ee074e33d (diff)
* kernel32.cc (CreateFileMappingW): Fix bug in reserve/commit handling.
Diffstat (limited to 'winsup/cygwin/kernel32.cc')
-rw-r--r--winsup/cygwin/kernel32.cc4
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 (&sect, access, &attr, psize, prot, attribs, hFile);