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
1afb3693
Commit
1afb3693
authored
May 31, 2017
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 31, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Zero bits parameter must be less than 21.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5bd58bb2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
virtual.c
dlls/kernel32/tests/virtual.c
+0
-2
virtual.c
dlls/ntdll/virtual.c
+3
-1
No files found.
dlls/kernel32/tests/virtual.c
View file @
1afb3693
...
...
@@ -400,7 +400,6 @@ static void test_VirtualAlloc(void)
addr2
=
NULL
;
status
=
pNtAllocateVirtualMemory
(
GetCurrentProcess
(),
&
addr2
,
22
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_3
,
"NtAllocateVirtualMemory returned %08x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
ok
(
VirtualFree
(
addr2
,
0
,
MEM_RELEASE
),
"VirtualFree failed
\n
"
);
...
...
@@ -1168,7 +1167,6 @@ static void test_NtMapViewOfSection(void)
ptr2
=
NULL
;
size
=
0
;
status
=
pNtMapViewOfSection
(
mapping
,
hProcess
,
&
ptr2
,
22
,
0
,
&
offset
,
&
size
,
1
,
0
,
PAGE_READWRITE
);
todo_wine
ok
(
status
==
STATUS_INVALID_PARAMETER_4
,
"NtMapViewOfSection returned %x
\n
"
,
status
);
if
(
status
==
STATUS_SUCCESS
)
{
...
...
dlls/ntdll/virtual.c
View file @
1afb3693
...
...
@@ -279,6 +279,7 @@ static inline UINT_PTR get_mask( ULONG zero_bits )
{
if
(
!
zero_bits
)
return
0xffff
;
/* allocations are aligned to 64K by default */
if
(
zero_bits
<
page_shift
)
zero_bits
=
page_shift
;
if
(
zero_bits
>
21
)
return
0
;
return
(
1
<<
zero_bits
)
-
1
;
}
...
...
@@ -1885,6 +1886,7 @@ NTSTATUS WINAPI NtAllocateVirtualMemory( HANDLE process, PVOID *ret, ULONG zero_
TRACE
(
"%p %p %08lx %x %08x
\n
"
,
process
,
*
ret
,
size
,
type
,
protect
);
if
(
!
size
)
return
STATUS_INVALID_PARAMETER
;
if
(
!
mask
)
return
STATUS_INVALID_PARAMETER_3
;
if
(
process
!=
NtCurrentProcess
())
{
...
...
@@ -2550,7 +2552,7 @@ NTSTATUS WINAPI NtMapViewOfSection( HANDLE handle, HANDLE process, PVOID *addr_p
/* Check parameters */
if
(
*
addr_ptr
&&
zero_bits
)
if
(
(
*
addr_ptr
&&
zero_bits
)
||
!
mask
)
return
STATUS_INVALID_PARAMETER_4
;
#ifndef _WIN64
...
...
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