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
f41ac64a
Commit
f41ac64a
authored
Sep 12, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wow64: Don't add MEM_RESERVE for invalid flags combinations.
parent
d76f5b4a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
wow64.c
dlls/ntdll/tests/wow64.c
+14
-0
virtual.c
dlls/wow64/virtual.c
+1
-1
No files found.
dlls/ntdll/tests/wow64.c
View file @
f41ac64a
...
...
@@ -408,6 +408,20 @@ static void test_cross_process_notifications( HANDLE process, void *ptr )
ok
(
!
entry
,
"not at end of list
\n
"
);
addr
=
NULL
;
size
=
0x321
;
status
=
NtAllocateVirtualMemory
(
process
,
&
addr
,
0
,
&
size
,
0
,
PAGE_EXECUTE_READ
);
ok
(
status
==
STATUS_INVALID_PARAMETER
,
"NtAllocateVirtualMemory failed %lx
\n
"
,
status
);
entry
=
pop_from_work_list
(
&
list
->
work_list
);
if
(
current_machine
!=
IMAGE_FILE_MACHINE_ARM64
)
{
entry
=
expect_cross_work_entry
(
list
,
entry
,
CrossProcessPreVirtualAlloc
,
addr
,
0x321
,
0
,
PAGE_EXECUTE_READ
,
0
,
0xcccccccc
);
entry
=
expect_cross_work_entry
(
list
,
entry
,
CrossProcessPostVirtualAlloc
,
addr
,
0x321
,
0
,
PAGE_EXECUTE_READ
,
status
,
0xcccccccc
);
}
ok
(
!
entry
,
"not at end of list
\n
"
);
addr
=
NULL
;
size
=
0x4321
;
status
=
NtAllocateVirtualMemory
(
process
,
&
addr
,
0
,
&
size
,
MEM_RESERVE
,
PAGE_EXECUTE_READWRITE
);
ok
(
!
status
,
"NtAllocateVirtualMemory failed %lx
\n
"
,
status
);
...
...
dlls/wow64/virtual.c
View file @
f41ac64a
...
...
@@ -153,7 +153,7 @@ NTSTATUS WINAPI wow64_NtAllocateVirtualMemory( UINT *args )
BOOL
is_current
=
RtlIsCurrentProcess
(
process
);
NTSTATUS
status
;
if
(
!
addr
)
type
|=
MEM_RESERVE
;
if
(
!
addr
&&
(
type
&
MEM_COMMIT
)
)
type
|=
MEM_RESERVE
;
if
(
!
is_current
)
send_cross_process_notification
(
process
,
CrossProcessPreVirtualAlloc
,
...
...
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