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
3371ba9f
Commit
3371ba9f
authored
Nov 19, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 20, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/tab: Fix reading out of array bounds on TCM_SETCURSEL.
parent
d28eabda
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
tab.c
dlls/comctl32/tab.c
+5
-4
No files found.
dlls/comctl32/tab.c
View file @
3371ba9f
...
@@ -247,16 +247,17 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
...
@@ -247,16 +247,17 @@ static inline LRESULT TAB_SetCurSel (TAB_INFO *infoPtr, INT iItem)
TRACE
(
"(%p %d)
\n
"
,
infoPtr
,
iItem
);
TRACE
(
"(%p %d)
\n
"
,
infoPtr
,
iItem
);
if
(
iItem
<
0
)
if
(
iItem
<
0
)
infoPtr
->
iSelected
=
-
1
;
infoPtr
->
iSelected
=
-
1
;
else
if
(
iItem
>=
infoPtr
->
uNumItem
)
else
if
(
iItem
>=
infoPtr
->
uNumItem
)
return
-
1
;
return
-
1
;
else
{
else
{
if
(
infoPtr
->
iSelected
!=
iItem
)
{
if
(
prevItem
!=
iItem
)
{
if
(
prevItem
!=
-
1
)
TAB_GetItem
(
infoPtr
,
prevItem
)
->
dwState
&=
~
TCIS_BUTTONPRESSED
;
TAB_GetItem
(
infoPtr
,
prevItem
)
->
dwState
&=
~
TCIS_BUTTONPRESSED
;
TAB_GetItem
(
infoPtr
,
iItem
)
->
dwState
|=
TCIS_BUTTONPRESSED
;
TAB_GetItem
(
infoPtr
,
iItem
)
->
dwState
|=
TCIS_BUTTONPRESSED
;
infoPtr
->
iSelected
=
iItem
;
infoPtr
->
iSelected
=
iItem
;
infoPtr
->
uFocus
=
iItem
;
infoPtr
->
uFocus
=
iItem
;
TAB_EnsureSelectionVisible
(
infoPtr
);
TAB_EnsureSelectionVisible
(
infoPtr
);
TAB_InvalidateTabArea
(
infoPtr
);
TAB_InvalidateTabArea
(
infoPtr
);
}
}
...
...
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