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
1e110562
Commit
1e110562
authored
May 20, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
May 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Workaround Local(Alloc|Free) invalid access warnings.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
parent
f7a4ca44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
memory.c
dlls/kernelbase/memory.c
+2
-2
No files found.
dlls/kernelbase/memory.c
View file @
1e110562
...
...
@@ -712,7 +712,7 @@ static struct kernelbase_global_data global_data = {0};
static
inline
struct
mem_entry
*
unsafe_mem_from_HLOCAL
(
HLOCAL
handle
)
{
struct
mem_entry
*
mem
=
CONTAINING_RECORD
(
handle
,
struct
mem_entry
,
ptr
);
struct
mem_entry
*
mem
=
CONTAINING_RECORD
(
*
(
volatile
HANDLE
*
)
&
handle
,
struct
mem_entry
,
ptr
);
struct
kernelbase_global_data
*
data
=
&
global_data
;
if
(((
UINT_PTR
)
handle
&
((
sizeof
(
void
*
)
<<
1
)
-
1
))
!=
sizeof
(
void
*
))
return
NULL
;
if
(
mem
<
data
->
mem_entries
||
mem
>=
data
->
mem_entries_end
)
return
NULL
;
...
...
@@ -831,7 +831,7 @@ HLOCAL WINAPI DECLSPEC_HOTPATCH LocalAlloc( UINT flags, SIZE_T size )
return
handle
;
failed:
if
(
mem
)
LocalFree
(
handle
);
if
(
mem
)
LocalFree
(
*
(
volatile
HANDLE
*
)
&
handle
);
SetLastError
(
ERROR_NOT_ENOUGH_MEMORY
);
return
0
;
}
...
...
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