[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:
Alexei Podtelezhnikov 2026-03-09 19:53:30 -04:00
parent 93e7335adb
commit bf18015d3a

View file

@ -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;