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
3e3ca7dd
Commit
3e3ca7dd
authored
May 25, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
May 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Validate flags in NtUnmapViewOfSectionEx().
parent
4806b1c2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
process.c
dlls/kernelbase/tests/process.c
+2
-2
virtual.c
dlls/ntdll/unix/virtual.c
+8
-1
No files found.
dlls/kernelbase/tests/process.c
View file @
3e3ca7dd
...
...
@@ -242,9 +242,9 @@ static void test_VirtualAlloc2(void)
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got ret %d, error %lu.
\n
"
,
ret
,
GetLastError
());
ret
=
pUnmapViewOfFile2
(
GetCurrentProcess
(),
view1
,
MEM_RELEASE
|
MEM_PRESERVE_PLACEHOLDER
);
todo_wine
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got ret %d, error %lu.
\n
"
,
ret
,
GetLastError
());
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"Got ret %d, error %lu.
\n
"
,
ret
,
GetLastError
());
ret
=
pUnmapViewOfFile2
(
GetCurrentProcess
(),
view1
,
MEM_PRESERVE_PLACEHOLDER
);
todo_wine
ok
(
ret
,
"Got error %lu.
\n
"
,
GetLastError
());
ok
(
ret
,
"Got error %lu.
\n
"
,
GetLastError
());
memset
(
&
info
,
0
,
sizeof
(
info
));
VirtualQuery
(
placeholder1
,
&
info
,
sizeof
(
info
));
...
...
dlls/ntdll/unix/virtual.c
View file @
3e3ca7dd
...
...
@@ -5298,7 +5298,14 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
*/
NTSTATUS
WINAPI
NtUnmapViewOfSectionEx
(
HANDLE
process
,
PVOID
addr
,
ULONG
flags
)
{
if
(
flags
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
(
int
)
flags
);
static
const
ULONG
type_mask
=
MEM_UNMAP_WITH_TRANSIENT_BOOST
|
MEM_PRESERVE_PLACEHOLDER
;
if
(
flags
&
~
type_mask
)
{
WARN
(
"Unsupported flags %#x.
\n
"
,
(
int
)
flags
);
return
STATUS_INVALID_PARAMETER
;
}
if
(
flags
)
FIXME
(
"Ignoring flags %#x.
\n
"
,
(
int
)
flags
);
return
unmap_view_of_section
(
process
,
addr
);
}
...
...
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