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
7b6b9d6e
Commit
7b6b9d6e
authored
Nov 17, 2003
by
Rein Klazes
Committed by
Alexandre Julliard
Nov 17, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore invalid iSubItem in LISTVIEW_GetItemT().
parent
778f4b26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
listview.c
dlls/comctl32/listview.c
+18
-10
No files found.
dlls/comctl32/listview.c
View file @
7b6b9d6e
...
...
@@ -4982,6 +4982,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
ITEM_INFO
*
lpItem
;
ITEMHDR
*
pItemHdr
;
HDPA
hdpaSubItems
;
INT
isubitem
;
TRACE
(
"(lpLVItem=%s, isW=%d)
\n
"
,
debuglvitem_t
(
lpLVItem
,
isW
),
isW
);
...
...
@@ -4990,6 +4991,9 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
if
(
lpLVItem
->
mask
==
0
)
return
TRUE
;
/* make a local copy */
isubitem
=
lpLVItem
->
iSubItem
;
/* a quick optimization if all we're asked is the focus state
* these queries are worth optimising since they are common,
* and can be answered in constant time, without the heavy accesses */
...
...
@@ -5016,7 +5020,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
* depend on the uninitialized fields being 0 */
dispInfo
.
item
.
mask
=
lpLVItem
->
mask
&
~
LVIF_PARAM
;
dispInfo
.
item
.
iItem
=
lpLVItem
->
iItem
;
dispInfo
.
item
.
iSubItem
=
lpLVItem
->
iSubI
tem
;
dispInfo
.
item
.
iSubItem
=
isubi
tem
;
if
(
lpLVItem
->
mask
&
LVIF_TEXT
)
{
dispInfo
.
item
.
pszText
=
lpLVItem
->
pszText
;
...
...
@@ -5048,7 +5052,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
if
(
lpLVItem
->
mask
&
LVIF_PARAM
)
lpLVItem
->
lParam
=
0
;
/* we store only a little state, so if we're not asked, we're done */
if
(
!
(
lpLVItem
->
mask
&
LVIF_STATE
)
||
lpLVItem
->
iSubI
tem
)
return
TRUE
;
if
(
!
(
lpLVItem
->
mask
&
LVIF_STATE
)
||
isubi
tem
)
return
TRUE
;
/* if focus is handled by us, report it */
if
(
lpLVItem
->
stateMask
&
~
infoPtr
->
uCallbackMask
&
LVIS_FOCUSED
)
...
...
@@ -5074,16 +5078,20 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
lpItem
=
(
ITEM_INFO
*
)
DPA_GetPtr
(
hdpaSubItems
,
0
);
assert
(
lpItem
);
if
(
lpLVItem
->
iSubI
tem
)
if
(
isubi
tem
)
{
SUBITEM_INFO
*
lpSubItem
=
LISTVIEW_GetSubItemPtr
(
hdpaSubItems
,
lpLVItem
->
iSubI
tem
);
SUBITEM_INFO
*
lpSubItem
=
LISTVIEW_GetSubItemPtr
(
hdpaSubItems
,
isubi
tem
);
pItemHdr
=
lpSubItem
?
&
lpSubItem
->
hdr
:
&
callbackHdr
;
if
(
!
lpSubItem
)
{
WARN
(
" iSubItem invalid (%08x), ignored.
\n
"
,
isubitem
);
isubitem
=
0
;
}
}
else
pItemHdr
=
&
lpItem
->
hdr
;
/* Do we need to query the state from the app? */
if
((
lpLVItem
->
mask
&
LVIF_STATE
)
&&
infoPtr
->
uCallbackMask
&&
lpLVItem
->
iSubI
tem
==
0
)
if
((
lpLVItem
->
mask
&
LVIF_STATE
)
&&
infoPtr
->
uCallbackMask
&&
isubi
tem
==
0
)
{
dispInfo
.
item
.
mask
|=
LVIF_STATE
;
dispInfo
.
item
.
stateMask
=
infoPtr
->
uCallbackMask
;
...
...
@@ -5091,7 +5099,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
/* Do we need to enquire about the image? */
if
((
lpLVItem
->
mask
&
LVIF_IMAGE
)
&&
pItemHdr
->
iImage
==
I_IMAGECALLBACK
&&
(
lpLVItem
->
iSubI
tem
==
0
||
(
infoPtr
->
dwLvExStyle
&
LVS_EX_SUBITEMIMAGES
)))
(
isubi
tem
==
0
||
(
infoPtr
->
dwLvExStyle
&
LVS_EX_SUBITEMIMAGES
)))
{
dispInfo
.
item
.
mask
|=
LVIF_IMAGE
;
dispInfo
.
item
.
iImage
=
I_IMAGECALLBACK
;
...
...
@@ -5111,14 +5119,14 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
if
(
dispInfo
.
item
.
mask
!=
0
)
{
dispInfo
.
item
.
iItem
=
lpLVItem
->
iItem
;
dispInfo
.
item
.
iSubItem
=
lpLVItem
->
iSubI
tem
;
dispInfo
.
item
.
iSubItem
=
isubi
tem
;
dispInfo
.
item
.
lParam
=
lpItem
->
lParam
;
notify_dispinfoT
(
infoPtr
,
LVN_GETDISPINFOW
,
&
dispInfo
,
isW
);
TRACE
(
" getdispinfo(2):item=%s
\n
"
,
debuglvitem_t
(
&
dispInfo
.
item
,
isW
));
}
/* we should not store values for subitems */
if
(
lpLVItem
->
iSubI
tem
)
dispInfo
.
item
.
mask
&=
~
LVIF_DI_SETITEM
;
if
(
isubi
tem
)
dispInfo
.
item
.
mask
&=
~
LVIF_DI_SETITEM
;
/* Now, handle the iImage field */
if
(
dispInfo
.
item
.
mask
&
LVIF_IMAGE
)
...
...
@@ -5129,7 +5137,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
}
else
if
(
lpLVItem
->
mask
&
LVIF_IMAGE
)
{
if
(
lpLVItem
->
iSubI
tem
==
0
||
(
infoPtr
->
dwLvExStyle
&
LVS_EX_SUBITEMIMAGES
))
if
(
isubi
tem
==
0
||
(
infoPtr
->
dwLvExStyle
&
LVS_EX_SUBITEMIMAGES
))
lpLVItem
->
iImage
=
pItemHdr
->
iImage
;
else
lpLVItem
->
iImage
=
0
;
...
...
@@ -5150,7 +5158,7 @@ static BOOL LISTVIEW_GetItemT(LISTVIEW_INFO *infoPtr, LPLVITEMW lpLVItem, BOOL i
}
/* if this is a subitem, we're done */
if
(
lpLVItem
->
iSubI
tem
)
return
TRUE
;
if
(
isubi
tem
)
return
TRUE
;
/* Next is the lParam field */
if
(
dispInfo
.
item
.
mask
&
LVIF_PARAM
)
...
...
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