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
89b415f7
Commit
89b415f7
authored
Aug 27, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check for valid object in GDI_GetObjPtr even for MAGIC_DONTCARE.
parent
c3f2a140
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
gdiobj.c
objects/gdiobj.c
+8
-3
No files found.
objects/gdiobj.c
View file @
89b415f7
...
...
@@ -390,10 +390,15 @@ void *GDI_GetObjPtr( HGDIOBJ handle, WORD magic )
if
(
handle
&
2
)
/* GDI heap handle */
{
ptr
=
(
GDIOBJHDR
*
)
LOCAL_Lock
(
GDI_HeapSel
,
handle
);
if
(
ptr
&&
(
magic
!=
MAGIC_DONTCARE
)
&&
(
GDIMAGIC
(
ptr
->
wMagic
)
!=
magic
)
)
if
(
ptr
)
{
LOCAL_Unlock
(
GDI_HeapSel
,
handle
);
ptr
=
NULL
;
if
(((
magic
!=
MAGIC_DONTCARE
)
&&
(
GDIMAGIC
(
ptr
->
wMagic
)
!=
magic
))
||
(
GDIMAGIC
(
ptr
->
wMagic
)
<
FIRST_MAGIC
)
||
(
GDIMAGIC
(
ptr
->
wMagic
)
>
LAST_MAGIC
))
{
LOCAL_Unlock
(
GDI_HeapSel
,
handle
);
ptr
=
NULL
;
}
}
}
else
/* large heap handle */
...
...
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