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
a24551e6
Commit
a24551e6
authored
Jan 29, 2002
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jan 29, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not write beyond end of color table in X11DRV_DIB_SetDIBColorTable.
parent
187a6795
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
dib.c
graphics/x11drv/dib.c
+5
-3
No files found.
graphics/x11drv/dib.c
View file @
a24551e6
...
...
@@ -5836,6 +5836,8 @@ UINT X11DRV_DIB_SetDIBColorTable(BITMAPOBJ *bmp, DC *dc, UINT start, UINT count,
X11DRV_DIBSECTION
*
dib
=
(
X11DRV_DIBSECTION
*
)
bmp
->
dib
;
if
(
dib
&&
dib
->
colorMap
)
{
UINT
end
=
count
+
start
;
if
(
end
>
dib
->
nColorMap
)
end
=
dib
->
nColorMap
;
/*
* Changing color table might change the mapping between
* DIB colors and X11 colors and thus alter the visible state
...
...
@@ -5844,9 +5846,9 @@ UINT X11DRV_DIB_SetDIBColorTable(BITMAPOBJ *bmp, DC *dc, UINT start, UINT count,
X11DRV_DIB_Lock
(
bmp
,
DIB_Status_AppMod
,
FALSE
);
X11DRV_DIB_GenColorMap
(
dc
,
dib
->
colorMap
,
DIB_RGB_COLORS
,
dib
->
dibSection
.
dsBm
.
bmBitsPixel
,
TRUE
,
colors
,
start
,
count
+
start
);
TRUE
,
colors
,
start
,
end
);
X11DRV_DIB_Unlock
(
bmp
,
TRUE
);
return
coun
t
;
return
end
-
star
t
;
}
return
0
;
}
...
...
@@ -5859,7 +5861,7 @@ UINT X11DRV_DIB_GetDIBColorTable(BITMAPOBJ *bmp, DC *dc, UINT start, UINT count,
X11DRV_DIBSECTION
*
dib
=
(
X11DRV_DIBSECTION
*
)
bmp
->
dib
;
if
(
dib
&&
dib
->
colorMap
)
{
int
i
,
end
=
count
+
start
;
UINT
i
,
end
=
count
+
start
;
if
(
end
>
dib
->
nColorMap
)
end
=
dib
->
nColorMap
;
for
(
i
=
start
;
i
<
end
;
i
++
,
colors
++
)
{
COLORREF
col
=
X11DRV_PALETTE_ToLogical
(
dib
->
colorMap
[
i
]
);
...
...
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