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
4f5cbfb4
Commit
4f5cbfb4
authored
Jan 03, 2006
by
Ulrich Czekalla
Committed by
Alexandre Julliard
Jan 03, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Disallow creation of compressed DIB sections.
parent
dfa74b99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
dib.c
dlls/gdi/dib.c
+7
-6
No files found.
dlls/gdi/dib.c
View file @
4f5cbfb4
...
...
@@ -1148,6 +1148,12 @@ HBITMAP DIB_CreateDIBSection(HDC hdc, const BITMAPINFO *bmi, UINT usage,
&
planes
,
&
bpp
,
&
compression
,
&
sizeImage
))
==
-
1
))
return
0
;
if
(
compression
!=
BI_RGB
&&
compression
!=
BI_BITFIELDS
)
{
TRACE
(
"can't create a compressed (%lu) dibsection
\n
"
,
compression
);
return
0
;
}
if
(
!
(
dib
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
dib
)
)))
return
0
;
TRACE
(
"format (%ld,%ld), planes %d, bpp %d, size %ld, %s
\n
"
,
...
...
@@ -1186,12 +1192,7 @@ HBITMAP DIB_CreateDIBSection(HDC hdc, const BITMAPINFO *bmi, UINT usage,
if
(
bpp
<=
8
)
dib
->
dsBmih
.
biClrUsed
=
1
<<
bpp
;
/* only use sizeImage if it's valid and we're dealing with a compressed bitmap */
if
(
sizeImage
&&
(
compression
==
BI_RLE4
||
compression
==
BI_RLE8
))
dib
->
dsBmih
.
biSizeImage
=
sizeImage
;
else
dib
->
dsBmih
.
biSizeImage
=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
dib
->
dsBmih
.
biSizeImage
=
dib
->
dsBm
.
bmWidthBytes
*
dib
->
dsBm
.
bmHeight
;
/* set dsBitfields values */
if
(
usage
==
DIB_PAL_COLORS
||
bpp
<=
8
)
...
...
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