mirror of
https://gitlab.freedesktop.org/freetype/freetype.git
synced 2026-03-24 20:50:35 +01:00
[stroker] Actually validate outlines.
Fixes #1400. * src/base/ftstroke.c (FT_Glyph_Stroke): Check for `GetCount` error. (ft_stroke_border_get_counts): Actually return expected error. (FT_Glyph_Stroke): Minor.
This commit is contained in:
parent
93e7335adb
commit
bf18015d3a
1 changed files with 6 additions and 3 deletions
|
|
@ -693,6 +693,7 @@
|
|||
Fail:
|
||||
num_points = 0;
|
||||
num_contours = 0;
|
||||
error = FT_THROW( Invalid_Outline );
|
||||
goto Exit;
|
||||
}
|
||||
|
||||
|
|
@ -2251,7 +2252,7 @@
|
|||
FT_Stroker stroker,
|
||||
FT_Bool destroy )
|
||||
{
|
||||
FT_Error error = FT_ERR( Invalid_Argument );
|
||||
FT_Error error = FT_THROW( Invalid_Argument );
|
||||
FT_Glyph glyph = NULL;
|
||||
|
||||
|
||||
|
|
@ -2283,7 +2284,9 @@
|
|||
if ( error )
|
||||
goto Fail;
|
||||
|
||||
FT_Stroker_GetCounts( stroker, &num_points, &num_contours );
|
||||
error = FT_Stroker_GetCounts( stroker, &num_points, &num_contours );
|
||||
if ( error )
|
||||
goto Fail;
|
||||
|
||||
FT_Outline_Done( glyph->library, outline );
|
||||
|
||||
|
|
@ -2326,7 +2329,7 @@
|
|||
FT_Bool inside,
|
||||
FT_Bool destroy )
|
||||
{
|
||||
FT_Error error = FT_ERR( Invalid_Argument );
|
||||
FT_Error error = FT_THROW( Invalid_Argument );
|
||||
FT_Glyph glyph = NULL;
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue