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
43837ed2
Commit
43837ed2
authored
Jan 06, 2008
by
Gerald Pfeifer
Committed by
Alexandre Julliard
Jan 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Tighten range checking in PlayEnhMetaFileRecord() and remove four useless checks.
parent
ad92cdcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
enhmetafile.c
dlls/gdi32/enhmetafile.c
+7
-5
No files found.
dlls/gdi32/enhmetafile.c
View file @
43837ed2
...
...
@@ -1669,11 +1669,13 @@ BOOL WINAPI PlayEnhMetaFileRecord(
const
EMRCREATEDIBPATTERNBRUSHPT
*
lpCreate
=
(
const
EMRCREATEDIBPATTERNBRUSHPT
*
)
mr
;
LPVOID
lpPackedStruct
;
/* check that offsets and data are contained within the record */
if
(
!
(
(
lpCreate
->
cbBmi
>=
0
)
&&
(
lpCreate
->
cbBits
>=
0
)
&&
(
lpCreate
->
offBmi
>=
0
)
&&
(
lpCreate
->
offBits
>=
0
)
&&
((
lpCreate
->
offBmi
+
lpCreate
->
cbBmi
)
<=
mr
->
nSize
)
&&
((
lpCreate
->
offBits
+
lpCreate
->
cbBits
)
<=
mr
->
nSize
)
)
)
/* Check that offsets and data are contained within the record
* (including checking for wrap arounds).
*/
if
(
lpCreate
->
offBmi
+
lpCreate
->
cbBmi
>
mr
->
nSize
||
lpCreate
->
offBits
+
lpCreate
->
cbBits
>
mr
->
nSize
||
lpCreate
->
offBmi
+
lpCreate
->
cbBmi
<
lpCreate
->
offBmi
||
lpCreate
->
offBits
+
lpCreate
->
cbBits
<
lpCreate
->
offBits
)
{
ERR
(
"Invalid EMR_CREATEDIBPATTERNBRUSHPT record
\n
"
);
break
;
...
...
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