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
49df0467
Commit
49df0467
authored
Nov 05, 2006
by
Mike McCormack
Committed by
Alexandre Julliard
Nov 06, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Check if GetObject fails on bitmaps passed to us.
parent
6a9209da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
imagelist.c
dlls/comctl32/imagelist.c
+10
-5
No files found.
dlls/comctl32/imagelist.c
View file @
49df0467
...
...
@@ -212,7 +212,9 @@ ImageList_Add (HIMAGELIST himl, HBITMAP hbmImage, HBITMAP hbmMask)
if
(
!
is_valid
(
himl
))
return
-
1
;
GetObjectA
(
hbmImage
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
);
if
(
!
GetObjectW
(
hbmImage
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
))
return
-
1
;
nImageCount
=
bmp
.
bmWidth
/
himl
->
cx
;
IMAGELIST_InternalExpandBitmaps
(
himl
,
nImageCount
,
bmp
.
bmWidth
,
bmp
.
bmHeight
);
...
...
@@ -309,7 +311,7 @@ ImageList_AddMasked (HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
if
(
!
is_valid
(
himl
))
return
-
1
;
if
(
!
GetObject
A
(
hBitmap
,
sizeof
(
BITMAP
),
&
bmp
))
if
(
!
GetObject
W
(
hBitmap
,
sizeof
(
BITMAP
),
&
bmp
))
return
-
1
;
if
(
himl
->
cx
>
0
)
...
...
@@ -2218,8 +2220,10 @@ ImageList_Replace (HIMAGELIST himl, INT i, HBITMAP hbmImage,
return
FALSE
;
}
if
(
!
GetObjectW
(
hbmImage
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
))
return
FALSE
;
hdcImage
=
CreateCompatibleDC
(
0
);
GetObjectA
(
hbmImage
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bmp
);
/* Replace Image */
hOldBitmap
=
SelectObject
(
hdcImage
,
hbmImage
);
...
...
@@ -2691,7 +2695,7 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm, int cx, int cy)
{
LPBITMAPFILEHEADER
bmfh
;
LPBITMAPINFOHEADER
bmih
;
LPBYTE
data
,
lpBits
,
lpBitsOrg
;
LPBYTE
data
=
NULL
,
lpBits
=
NULL
,
lpBitsOrg
=
NULL
;
BITMAP
bm
;
INT
bitCount
,
sizeImage
,
offBits
,
totalSize
;
INT
nwidth
,
nheight
,
nsizeImage
,
icount
;
...
...
@@ -2700,7 +2704,8 @@ _write_bitmap(HBITMAP hBitmap, LPSTREAM pstm, int cx, int cy)
xdc
=
GetDC
(
0
);
GetObjectA
(
hBitmap
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bm
);
if
(
!
GetObjectW
(
hBitmap
,
sizeof
(
BITMAP
),
(
LPVOID
)
&
bm
))
goto
failed
;
/* XXX is this always correct? */
icount
=
bm
.
bmWidth
/
cx
;
...
...
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