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
c67f075d
Commit
c67f075d
authored
Feb 24, 2011
by
Wolfram Sang
Committed by
Alexandre Julliard
Feb 28, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Check bitmap info before it is used.
parent
ce5763b8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
cursoricon.c
dlls/user32/cursoricon.c
+8
-7
No files found.
dlls/user32/cursoricon.c
View file @
c67f075d
...
...
@@ -2198,6 +2198,14 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
if
(
bmfh
->
bfOffBits
)
offbits
=
bmfh
->
bfOffBits
-
sizeof
(
BITMAPFILEHEADER
);
}
bm_type
=
DIB_GetBitmapInfo
(
&
info
->
bmiHeader
,
&
width
,
&
height
,
&
bpp_dummy
,
&
compr_dummy
);
if
(
bm_type
==
-
1
)
{
WARN
(
"Invalid bitmap format!
\n
"
);
goto
end
;
}
size
=
bitmap_info_size
(
info
,
DIB_RGB_COLORS
);
fix_info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
scaled_info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
...
...
@@ -2209,13 +2217,6 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name,
DIB_FixColorsToLoadflags
(
fix_info
,
loadflags
,
pix
);
memcpy
(
scaled_info
,
fix_info
,
size
);
bm_type
=
DIB_GetBitmapInfo
(
&
fix_info
->
bmiHeader
,
&
width
,
&
height
,
&
bpp_dummy
,
&
compr_dummy
);
if
(
bm_type
==
-
1
)
{
WARN
(
"Invalid bitmap format!
\n
"
);
goto
end
;
}
if
(
desiredx
!=
0
)
new_width
=
desiredx
;
...
...
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