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
8903e536
Commit
8903e536
authored
May 22, 1999
by
Pascal Lessard
Committed by
Alexandre Julliard
May 22, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some null checking in the Get/SetBitmapBits functions.
parent
090e2d87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
bitmap.c
objects/bitmap.c
+6
-1
No files found.
objects/bitmap.c
View file @
8903e536
...
...
@@ -244,6 +244,10 @@ LONG WINAPI GetBitmapBits(
LONG
height
,
ret
;
if
(
!
bmp
)
return
0
;
/* If the bits vector is null, the function should return the read size */
if
(
bits
==
NULL
)
return
bmp
->
bitmap
.
bmWidthBytes
*
bmp
->
bitmap
.
bmHeight
;
if
(
count
<
0
)
{
WARN_
(
bitmap
)(
"(%ld): Negative number of bytes passed???
\n
"
,
count
);
...
...
@@ -318,7 +322,8 @@ LONG WINAPI SetBitmapBits(
BITMAPOBJ
*
bmp
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hbitmap
,
BITMAP_MAGIC
);
LONG
height
,
ret
;
if
(
!
bmp
)
return
0
;
if
((
!
bmp
)
||
(
!
bits
))
return
0
;
if
(
count
<
0
)
{
WARN_
(
bitmap
)(
"(%ld): Negative number of bytes passed???
\n
"
,
count
);
...
...
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