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
7371d0d2
Commit
7371d0d2
authored
Apr 20, 2010
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 20, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/listview: Exit early on LVM_CREATEDRAGIMAGE if null pointer passed for a point.
parent
1b67da35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
listview.c
dlls/comctl32/listview.c
+1
-1
listview.c
dlls/comctl32/tests/listview.c
+23
-0
No files found.
dlls/comctl32/listview.c
View file @
7371d0d2
...
...
@@ -5209,7 +5209,7 @@ static HIMAGELIST LISTVIEW_CreateDragImage(LISTVIEW_INFO *infoPtr, INT iItem, LP
HIMAGELIST
dragList
=
0
;
TRACE
(
"iItem=%d Count=%d
\n
"
,
iItem
,
infoPtr
->
nItemCount
);
if
(
iItem
<
0
||
iItem
>=
infoPtr
->
nItemCount
)
if
(
iItem
<
0
||
iItem
>=
infoPtr
->
nItemCount
||
!
lppt
)
return
0
;
rcItem
.
left
=
LVIR_BOUNDS
;
...
...
dlls/comctl32/tests/listview.c
View file @
7371d0d2
...
...
@@ -4344,6 +4344,28 @@ static void test_header_notification(void)
DestroyWindow
(
list
);
}
static
void
test_createdragimage
(
void
)
{
HIMAGELIST
himl
;
POINT
pt
;
HWND
list
;
list
=
create_listview_control
(
LVS_ICON
);
ok
(
list
!=
0
,
"failed to create listview window
\n
"
);
insert_item
(
list
,
0
);
/* NULL point */
himl
=
(
HIMAGELIST
)
SendMessageA
(
list
,
LVM_CREATEDRAGIMAGE
,
0
,
0
);
ok
(
himl
==
NULL
,
"got %p
\n
"
,
himl
);
himl
=
(
HIMAGELIST
)
SendMessageA
(
list
,
LVM_CREATEDRAGIMAGE
,
0
,
(
LPARAM
)
&
pt
);
ok
(
himl
!=
NULL
,
"got %p
\n
"
,
himl
);
ImageList_Destroy
(
himl
);
DestroyWindow
(
list
);
}
START_TEST
(
listview
)
{
HMODULE
hComctl32
;
...
...
@@ -4406,6 +4428,7 @@ START_TEST(listview)
test_finditem
();
test_hover
();
test_destroynotify
();
test_createdragimage
();
if
(
!
load_v6_module
(
&
ctx_cookie
,
&
hCtx
))
{
...
...
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