[psaux] Add safety guard (#54985).

* src/psaux/psobjs.c (cff_builder_close_contour): Do it.
color
Werner Lemberg 6 years ago
parent 3b6e65f7bf
commit 58e48e9287
  1. 6
      ChangeLog
  2. 8
      src/psaux/psobjs.c

@ -1,3 +1,9 @@
2018-11-09 Young Xiao <yangx92@hotmail.com>
[psaux] Add safety guard (#54985).
* src/psaux/psobjs.c (cff_builder_close_contour): Do it.
2018-11-08 Alexei Podtelezhnikov <apodtele@gmail.com>
* builds/unix/configure.raw: Require `windows.h' for windres.

@ -2042,6 +2042,14 @@
first = outline->n_contours <= 1
? 0 : outline->contours[outline->n_contours - 2] + 1;
/* in malformed fonts it can happen that a contour was started */
/* but no points were added */
if ( outline->n_contours && first == outline->n_points )
{
outline->n_contours--;
return;
}
/* We must not include the last point in the path if it */
/* is located on the first point. */
if ( outline->n_points > 1 )

Loading…
Cancel
Save