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
2a81c1ad
Commit
2a81c1ad
authored
Jun 13, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 13, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Make BITMAPINFOHEADER biSize check match what other parts of code do.
parent
24b1b2bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
32 deletions
+9
-32
dib.c
dlls/gdi32/dib.c
+9
-32
No files found.
dlls/gdi32/dib.c
View file @
2a81c1ad
...
...
@@ -149,22 +149,11 @@ int DIB_BitmapInfoSize( const BITMAPINFO * info, WORD coloruse )
* DIB_GetBitmapInfo
*
* Get the info from a bitmap header.
* Return 1 for INFOHEADER, 0 for COREHEADER,
* 4 for V4HEADER, 5 for V5HEADER, -1 for error.
* Return 0 for COREHEADER, 1 for INFOHEADER, -1 for error.
*/
static
int
DIB_GetBitmapInfo
(
const
BITMAPINFOHEADER
*
header
,
LONG
*
width
,
LONG
*
height
,
WORD
*
planes
,
WORD
*
bpp
,
DWORD
*
compr
,
DWORD
*
size
)
{
if
(
header
->
biSize
==
sizeof
(
BITMAPINFOHEADER
))
{
*
width
=
header
->
biWidth
;
*
height
=
header
->
biHeight
;
*
planes
=
header
->
biPlanes
;
*
bpp
=
header
->
biBitCount
;
*
compr
=
header
->
biCompression
;
*
size
=
header
->
biSizeImage
;
return
1
;
}
if
(
header
->
biSize
==
sizeof
(
BITMAPCOREHEADER
))
{
const
BITMAPCOREHEADER
*
core
=
(
const
BITMAPCOREHEADER
*
)
header
;
...
...
@@ -176,27 +165,15 @@ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
*
size
=
0
;
return
0
;
}
if
(
header
->
biSize
==
sizeof
(
BITMAPV4HEADER
))
if
(
header
->
biSize
>=
sizeof
(
BITMAPINFOHEADER
))
/* assume BITMAPINFOHEADER */
{
const
BITMAPV4HEADER
*
v4hdr
=
(
const
BITMAPV4HEADER
*
)
header
;
*
width
=
v4hdr
->
bV4Width
;
*
height
=
v4hdr
->
bV4Height
;
*
planes
=
v4hdr
->
bV4Planes
;
*
bpp
=
v4hdr
->
bV4BitCount
;
*
compr
=
v4hdr
->
bV4V4Compression
;
*
size
=
v4hdr
->
bV4SizeImage
;
return
4
;
}
if
(
header
->
biSize
==
sizeof
(
BITMAPV5HEADER
))
{
const
BITMAPV5HEADER
*
v5hdr
=
(
const
BITMAPV5HEADER
*
)
header
;
*
width
=
v5hdr
->
bV5Width
;
*
height
=
v5hdr
->
bV5Height
;
*
planes
=
v5hdr
->
bV5Planes
;
*
bpp
=
v5hdr
->
bV5BitCount
;
*
compr
=
v5hdr
->
bV5Compression
;
*
size
=
v5hdr
->
bV5SizeImage
;
return
5
;
*
width
=
header
->
biWidth
;
*
height
=
header
->
biHeight
;
*
planes
=
header
->
biPlanes
;
*
bpp
=
header
->
biBitCount
;
*
compr
=
header
->
biCompression
;
*
size
=
header
->
biSizeImage
;
return
1
;
}
ERR
(
"(%d): unknown/wrong size for header
\n
"
,
header
->
biSize
);
return
-
1
;
...
...
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