Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6fe7535c
Commit
6fe7535c
authored
May 20, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 20, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Fix VirtualAlloc2() when called with NULL process handle.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
30f1777e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
2 deletions
+1
-2
memory.c
dlls/kernelbase/memory.c
+1
-0
process.c
dlls/kernelbase/tests/process.c
+0
-2
No files found.
dlls/kernelbase/memory.c
View file @
6fe7535c
...
...
@@ -352,6 +352,7 @@ LPVOID WINAPI DECLSPEC_HOTPATCH VirtualAlloc2( HANDLE process, void *addr, SIZE_
{
LPVOID
ret
=
addr
;
if
(
!
process
)
process
=
GetCurrentProcess
();
if
(
!
set_ntstatus
(
NtAllocateVirtualMemoryEx
(
process
,
&
ret
,
&
size
,
type
,
protect
,
parameters
,
count
)))
return
NULL
;
return
ret
;
...
...
dlls/kernelbase/tests/process.c
View file @
6fe7535c
...
...
@@ -142,10 +142,8 @@ static void test_VirtualAlloc2(void)
size
=
0x80000
;
addr
=
pVirtualAlloc2
(
NULL
,
NULL
,
size
,
MEM_COMMIT
,
PAGE_EXECUTE_READWRITE
,
NULL
,
0
);
todo_wine
ok
(
!!
addr
,
"Failed to allocate, error %lu.
\n
"
,
GetLastError
());
ret
=
VirtualFree
(
addr
,
0
,
MEM_RELEASE
);
todo_wine
ok
(
ret
,
"Unexpected return value %d, error %lu.
\n
"
,
ret
,
GetLastError
());
/* Placeholder splitting functionality */
...
...
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