Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
af089289
Commit
af089289
authored
May 02, 2014
by
Akihiro Sagawa
Committed by
Alexandre Julliard
May 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32: Fix uncompressed bitmap size handling in DrawDibDraw.
parent
47a3a052
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
drawdib.c
dlls/msvfw32/drawdib.c
+2
-6
drawdib.c
dlls/msvfw32/tests/drawdib.c
+6
-0
No files found.
dlls/msvfw32/drawdib.c
View file @
af089289
...
...
@@ -355,12 +355,6 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
if
(
!
(
wFlags
&
DDF_UPDATE
))
{
DWORD
biSizeImage
=
lpbi
->
biSizeImage
;
/* biSizeImage may be set to 0 for BI_RGB (uncompressed) bitmaps */
if
((
lpbi
->
biCompression
==
BI_RGB
)
&&
(
biSizeImage
==
0
))
biSizeImage
=
((
lpbi
->
biWidth
*
lpbi
->
biBitCount
+
31
)
/
32
)
*
4
*
lpbi
->
biHeight
;
if
(
lpbi
->
biCompression
)
{
DWORD
flags
=
0
;
...
...
@@ -374,6 +368,8 @@ BOOL VFWAPI DrawDibDraw(HDRAWDIB hdd, HDC hdc,
}
else
{
/* BI_RGB: lpbi->biSizeImage isn't reliable */
DWORD
biSizeImage
=
((
lpbi
->
biWidth
*
lpbi
->
biBitCount
+
31
)
/
32
)
*
4
*
lpbi
->
biHeight
;
memcpy
(
whdd
->
lpvbits
,
lpBits
,
biSizeImage
);
}
}
...
...
dlls/msvfw32/tests/drawdib.c
View file @
af089289
...
...
@@ -105,6 +105,12 @@ static void test_DrawDib_sizeimage(void)
{
0
,
0
,
0
,
""
},
{
0
,
HEIGHT
,
0
,
""
},
{
WIDTH
,
0
,
0
,
""
},
/* [8] zero size (to compare [9], [10] ) */
{
WIDTH
,
HEIGHT
/
2
,
0
,
"8b75bf6d54a8645380114fe77505ee0699ffffaa"
},
/* [9] insufficient size */
{
WIDTH
,
HEIGHT
/
2
,
sizeof
(
RGBQUAD
),
"8b75bf6d54a8645380114fe77505ee0699ffffaa"
},
/* [10] too much size */
{
WIDTH
,
HEIGHT
/
2
,
WIDTH
*
HEIGHT
*
sizeof
(
RGBQUAD
),
"8b75bf6d54a8645380114fe77505ee0699ffffaa"
},
};
HDC
hdc
;
DWORD
src_dib_size
,
dst_dib_size
;
...
...
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