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
7a8470ea
Commit
7a8470ea
authored
Jun 26, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jun 26, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: NtMapViewOfSection should fail if both addr_ptr and zero_bits is set.
parent
0a12011a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
12 deletions
+15
-12
virtual.c
dlls/kernel32/tests/virtual.c
+12
-12
virtual.c
dlls/ntdll/virtual.c
+3
-0
No files found.
dlls/kernel32/tests/virtual.c
View file @
7a8470ea
...
...
@@ -1093,25 +1093,25 @@ static void test_NtMapViewOfSection(void)
size
=
0
;
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
12
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
{
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
}
ptr2
=
(
char
*
)
ptr
+
0x1000
;
size
=
0
;
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
16
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
{
status
=
pNtUnmapViewOfSection
(
hProcess
,
ptr2
);
ok
(
!
status
,
"NtUnmapViewOfSection failed status %x
\n
"
,
status
);
}
ptr2
=
(
char
*
)
ptr
+
0x1001
;
size
=
0
;
offset
.
QuadPart
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
16
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
ptr2
=
(
char
*
)
ptr
+
0x1000
;
size
=
0
;
offset
.
QuadPart
=
1
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
16
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
if
(
sizeof
(
void
*
)
==
sizeof
(
int
)
&&
(
!
pIsWow64Process
||
!
pIsWow64Process
(
GetCurrentProcess
(),
&
is_wow64
)
||
!
is_wow64
))
...
...
dlls/ntdll/virtual.c
View file @
7a8470ea
...
...
@@ -2601,6 +2601,9 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
/* Check parameters */
if
(
*
addr_ptr
&&
zero_bits
)
return
STATUS_INVALID_PARAMETER_4
;
if
((
offset
.
u
.
LowPart
&
mask
)
||
(
*
addr_ptr
&&
((
UINT_PTR
)
*
addr_ptr
&
mask
)))
return
STATUS_MAPPED_ALIGNMENT
;
...
...
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