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
007c73c7
Commit
007c73c7
authored
Oct 11, 2005
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 11, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a safety check for number of control points in PolyBezierTo.
parent
b99fa154
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
painting.c
dlls/gdi/painting.c
+7
-3
No files found.
dlls/gdi/painting.c
View file @
007c73c7
...
@@ -736,9 +736,13 @@ BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints )
...
@@ -736,9 +736,13 @@ BOOL WINAPI PolyBezier( HDC hdc, const POINT* lppt, DWORD cPoints )
*/
*/
BOOL
WINAPI
PolyBezierTo
(
HDC
hdc
,
const
POINT
*
lppt
,
DWORD
cPoints
)
BOOL
WINAPI
PolyBezierTo
(
HDC
hdc
,
const
POINT
*
lppt
,
DWORD
cPoints
)
{
{
DC
*
dc
=
DC_GetDCUpdate
(
hdc
)
;
DC
*
dc
;
BOOL
ret
;
BOOL
ret
;
/* cbPoints must be 3 * n (where n>=1) */
if
(
!
cPoints
||
(
cPoints
%
3
)
!=
0
)
return
FALSE
;
dc
=
DC_GetDCUpdate
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
!
dc
)
return
FALSE
;
if
(
PATH_IsPathOpen
(
dc
->
path
))
if
(
PATH_IsPathOpen
(
dc
->
path
))
...
@@ -1110,8 +1114,8 @@ POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut )
...
@@ -1110,8 +1114,8 @@ POINT *GDI_Bezier( const POINT *Points, INT count, INT *nPtsOut )
POINT
*
out
;
POINT
*
out
;
INT
Bezier
,
dwOut
=
BEZIER_INITBUFSIZE
,
i
;
INT
Bezier
,
dwOut
=
BEZIER_INITBUFSIZE
,
i
;
if
(
(
count
-
1
)
%
3
!=
0
)
{
if
(
count
==
1
||
(
count
-
1
)
%
3
!=
0
)
{
ERR
(
"Invalid no. of points
\n
"
);
ERR
(
"Invalid no. of points
%d
\n
"
,
count
);
return
NULL
;
return
NULL
;
}
}
*
nPtsOut
=
0
;
*
nPtsOut
=
0
;
...
...
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