Skip to content

Commit

Permalink
Fix UB caused by wrong call to memcpy.
Browse files Browse the repository at this point in the history
m-carrasco committed Mar 17, 2023
1 parent b7e72fb commit a854444
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions 3rdparty/plutovg/plutovg-ft-stroker.c
Original file line number Diff line number Diff line change
@@ -629,8 +629,9 @@ static void ft_stroke_border_export(PVG_FT_StrokeBorder border,
PVG_FT_Outline* outline)
{
/* copy point locations */
memcpy(outline->points + outline->n_points, border->points,
border->num_points * sizeof(PVG_FT_Vector));
if (outline->points != NULL && border->points != NULL)
memcpy(outline->points + outline->n_points, border->points,
border->num_points * sizeof(PVG_FT_Vector));

/* copy tags */
{

0 comments on commit a854444

Please sign in to comment.