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
117f862c
Commit
117f862c
authored
Jun 23, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Validate the point count in Polyline and Polygon.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b2702b2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
path.c
dlls/gdi32/path.c
+14
-11
No files found.
dlls/gdi32/path.c
View file @
117f862c
...
...
@@ -1253,13 +1253,14 @@ static BOOL pathdrv_PolyDraw( PHYSDEV dev, const POINT *pts, const BYTE *types,
/*************************************************************
* pathdrv_Polyline
*/
static
BOOL
pathdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
bPoints
)
static
BOOL
pathdrv_Polyline
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
ount
)
{
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
BYTE
*
type
=
add_log_points
(
physdev
,
pts
,
cbPoints
,
PT_LINETO
)
;
BYTE
*
type
;
if
(
!
type
)
return
FALSE
;
if
(
cbPoints
)
type
[
0
]
=
PT_MOVETO
;
if
(
count
<
2
)
return
FALSE
;
if
(
!
(
type
=
add_log_points
(
physdev
,
pts
,
count
,
PT_LINETO
)))
return
FALSE
;
type
[
0
]
=
PT_MOVETO
;
return
TRUE
;
}
...
...
@@ -1267,25 +1268,27 @@ static BOOL pathdrv_Polyline( PHYSDEV dev, const POINT *pts, INT cbPoints )
/*************************************************************
* pathdrv_PolylineTo
*/
static
BOOL
pathdrv_PolylineTo
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
bPoints
)
static
BOOL
pathdrv_PolylineTo
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
ount
)
{
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
return
add_log_points_new_stroke
(
physdev
,
pts
,
cbPoints
,
PT_LINETO
);
if
(
count
<
1
)
return
FALSE
;
return
add_log_points_new_stroke
(
physdev
,
pts
,
count
,
PT_LINETO
);
}
/*************************************************************
* pathdrv_Polygon
*/
static
BOOL
pathdrv_Polygon
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
bPoints
)
static
BOOL
pathdrv_Polygon
(
PHYSDEV
dev
,
const
POINT
*
pts
,
INT
c
ount
)
{
struct
path_physdev
*
physdev
=
get_path_physdev
(
dev
);
BYTE
*
type
=
add_log_points
(
physdev
,
pts
,
cbPoints
,
PT_LINETO
)
;
BYTE
*
type
;
if
(
!
type
)
return
FALSE
;
if
(
cbPoints
)
type
[
0
]
=
PT_MOVETO
;
if
(
cbPoints
>
1
)
type
[
cbPoints
-
1
]
=
PT_LINETO
|
PT_CLOSEFIGURE
;
if
(
count
<
2
)
return
FALSE
;
if
(
!
(
type
=
add_log_points
(
physdev
,
pts
,
count
,
PT_LINETO
)))
return
FALSE
;
type
[
0
]
=
PT_MOVETO
;
type
[
count
-
1
]
=
PT_LINETO
|
PT_CLOSEFIGURE
;
return
TRUE
;
}
...
...
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