Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ef716e9d
Commit
ef716e9d
authored
Jul 27, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Don't grow the mapped file for read-only mappings.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
32c7153f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
virtual.c
dlls/kernel32/tests/virtual.c
+0
-2
mapping.c
server/mapping.c
+9
-1
No files found.
dlls/kernel32/tests/virtual.c
View file @
ef716e9d
...
@@ -1014,9 +1014,7 @@ static void test_MapViewOfFile(void)
...
@@ -1014,9 +1014,7 @@ static void test_MapViewOfFile(void)
map_size
.
QuadPart
=
0x3457
;
map_size
.
QuadPart
=
0x3457
;
status
=
pNtCreateSection
(
&
mapping
,
SECTION_QUERY
|
SECTION_MAP_READ
,
NULL
,
status
=
pNtCreateSection
(
&
mapping
,
SECTION_QUERY
|
SECTION_MAP_READ
,
NULL
,
&
map_size
,
PAGE_READONLY
,
SEC_COMMIT
,
file
);
&
map_size
,
PAGE_READONLY
,
SEC_COMMIT
,
file
);
todo_wine
ok
(
status
==
STATUS_SECTION_TOO_BIG
,
"NtCreateSection failed %x
\n
"
,
status
);
ok
(
status
==
STATUS_SECTION_TOO_BIG
,
"NtCreateSection failed %x
\n
"
,
status
);
if
(
!
status
)
CloseHandle
(
mapping
);
status
=
pNtCreateSection
(
&
mapping
,
SECTION_QUERY
|
SECTION_MAP_READ
,
NULL
,
status
=
pNtCreateSection
(
&
mapping
,
SECTION_QUERY
|
SECTION_MAP_READ
,
NULL
,
&
map_size
,
PAGE_READONLY
,
SEC_IMAGE
,
file
);
&
map_size
,
PAGE_READONLY
,
SEC_IMAGE
,
file
);
ok
(
status
==
STATUS_INVALID_IMAGE_NOT_MZ
,
"NtCreateSection failed %x
\n
"
,
status
);
ok
(
status
==
STATUS_INVALID_IMAGE_NOT_MZ
,
"NtCreateSection failed %x
\n
"
,
status
);
...
...
server/mapping.c
View file @
ef716e9d
...
@@ -574,7 +574,15 @@ static struct object *create_mapping( struct object *root, const struct unicode_
...
@@ -574,7 +574,15 @@ static struct object *create_mapping( struct object *root, const struct unicode_
goto
error
;
goto
error
;
}
}
}
}
else
if
(
st
.
st_size
<
mapping
->
size
&&
!
grow_file
(
unix_fd
,
mapping
->
size
))
goto
error
;
else
if
(
st
.
st_size
<
mapping
->
size
)
{
if
(
!
(
access
&
FILE_WRITE_DATA
))
{
set_error
(
STATUS_SECTION_TOO_BIG
);
goto
error
;
}
if
(
!
grow_file
(
unix_fd
,
mapping
->
size
))
goto
error
;
}
}
}
else
/* Anonymous mapping (no associated file) */
else
/* Anonymous mapping (no associated file) */
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment