[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[freetype2] master 58e48e9: [psaux] Add safety guard (#54985).
From: |
Werner LEMBERG |
Subject: |
[freetype2] master 58e48e9: [psaux] Add safety guard (#54985). |
Date: |
Fri, 9 Nov 2018 06:15:22 -0500 (EST) |
branch: master
commit 58e48e92877f873248b84435e0c2350dab208bfa
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>
[psaux] Add safety guard (#54985).
* src/psaux/psobjs.c (cff_builder_close_contour): Do it.
---
ChangeLog | 6 ++++++
src/psaux/psobjs.c | 8 ++++++++
2 files changed, 14 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 5d23322..3b7c47c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-11-09 Young Xiao <address@hidden>
+
+ [psaux] Add safety guard (#54985).
+
+ * src/psaux/psobjs.c (cff_builder_close_contour): Do it.
+
2018-11-08 Alexei Podtelezhnikov <address@hidden>
* builds/unix/configure.raw: Require `windows.h' for windres.
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 906c008..5c6b9b9 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -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 )
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [freetype2] master 58e48e9: [psaux] Add safety guard (#54985).,
Werner LEMBERG <=