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
48efba00
Commit
48efba00
authored
Dec 19, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/rebar: Don't read outside of bands array on dragging.
parent
07fc19bb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
rebar.c
dlls/comctl32/rebar.c
+8
-3
No files found.
dlls/comctl32/rebar.c
View file @
48efba00
...
...
@@ -2020,15 +2020,19 @@ REBAR_HandleLRDrag (REBAR_INFO *infoPtr, const POINT *ptsmove)
-
(
xBand
+
REBAR_PRE_GRIPPER
-
infoPtr
->
ihitoffset
);
if
(
movement
<
0
)
{
int
cxLeft
=
REBAR_ShrinkBandsRTL
(
infoPtr
,
iRowBegin
,
iHitBand
,
-
movement
,
TRUE
);
INT
cxLeft
=
REBAR_ShrinkBandsRTL
(
infoPtr
,
iRowBegin
,
iHitBand
,
-
movement
,
TRUE
);
hitBand
->
cxEffective
+=
-
movement
-
cxLeft
;
hitBand
->
cx
=
hitBand
->
cxEffective
;
}
else
if
(
movement
>
0
)
{
int
cxLeft
=
REBAR_ShrinkBandsLTR
(
infoPtr
,
iHitBand
,
iRowEnd
,
movement
,
TRUE
);
INT
prev
;
if
((
prev
=
prev_visible
(
infoPtr
,
iHitBand
))
>=
0
)
{
INT
cxLeft
=
REBAR_ShrinkBandsLTR
(
infoPtr
,
iHitBand
,
iRowEnd
,
movement
,
TRUE
);
REBAR_BAND
*
lpPrev
=
REBAR_GetBand
(
infoPtr
,
prev_visible
(
infoPtr
,
iHitBand
));
lpPrev
->
cxEffective
+=
movement
-
cxLeft
;
lpPrev
->
cx
=
lpPrev
->
cxEffective
;
}
}
REBAR_SetRowRectsX
(
infoPtr
,
iRowBegin
,
iRowEnd
);
if
(
infoPtr
->
dwStyle
&
CCS_VERT
)
...
...
@@ -3004,12 +3008,13 @@ REBAR_MouseMove (REBAR_INFO *infoPtr, LPARAM lParam)
/* if we are currently dragging a band */
if
(
infoPtr
->
iGrabbedBand
>=
0
)
{
REBAR_BAND
*
band1
,
*
band2
;
REBAR_BAND
*
band1
=
NULL
,
*
band2
;
int
yPtMove
=
(
infoPtr
->
dwStyle
&
CCS_VERT
?
ptMove
.
x
:
ptMove
.
y
);
if
(
GetCapture
()
!=
infoPtr
->
hwndSelf
)
ERR
(
"We are dragging but haven't got capture?!?
\n
"
);
if
(
infoPtr
->
iGrabbedBand
>
0
)
band1
=
REBAR_GetBand
(
infoPtr
,
infoPtr
->
iGrabbedBand
-
1
);
band2
=
REBAR_GetBand
(
infoPtr
,
infoPtr
->
iGrabbedBand
);
...
...
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