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
a9ff3349
Commit
a9ff3349
authored
Mar 17, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Mar 17, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix invalid memory access and leak if alloc_user_handle fails (Coverity).
parent
41b24f21
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
cursoricon.c
dlls/user32/cursoricon.c
+6
-1
No files found.
dlls/user32/cursoricon.c
View file @
a9ff3349
...
...
@@ -123,12 +123,14 @@ static HICON alloc_icon_handle( BOOL is_ani, UINT num_steps )
{
struct
cursoricon_object
*
obj
;
int
icon_size
;
HICON
handle
;
if
(
is_ani
)
icon_size
=
FIELD_OFFSET
(
struct
animated_cursoricon_object
,
frames
[
num_steps
]
);
else
icon_size
=
sizeof
(
struct
static_cursoricon_object
);
obj
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
icon_size
);
if
(
!
obj
)
return
NULL
;
obj
->
delay
=
0
;
obj
->
is_ani
=
is_ani
;
...
...
@@ -139,7 +141,10 @@ static HICON alloc_icon_handle( BOOL is_ani, UINT num_steps )
ani_icon_data
->
num_steps
=
num_steps
;
ani_icon_data
->
num_frames
=
num_steps
;
/* changed later for some animated cursors */
}
return
alloc_user_handle
(
&
obj
->
obj
,
USER_ICON
);
if
(
!
(
handle
=
alloc_user_handle
(
&
obj
->
obj
,
USER_ICON
)))
HeapFree
(
GetProcessHeap
(),
0
,
obj
);
return
handle
;
}
static
struct
cursoricon_object
*
get_icon_ptr
(
HICON
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