* src/cff/cffload.c (cff_load_private_dict): Always init `blend'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/ChangeLog b/ChangeLog
index b89a082..a6cc7df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_load_private_dict): Always init `blend'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=295
+
2016-12-16 Werner Lemberg <wl@gnu.org>
[truetype] Fix `cvar' sanity test.
diff --git a/src/cff/cffload.c b/src/cff/cffload.c
index b9e052d..33e8d19 100644
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1843,13 +1843,14 @@
FT_UInt stackSize;
- if ( !top->private_offset || !top->private_size )
- goto Exit2; /* no private DICT, do nothing */
-
- /* store handle needed to access memory, vstore for blend */
+ /* store handle needed to access memory, vstore for blend; */
+ /* we need this for clean-up even if there is no private DICT */
subfont->blend.font = font;
subfont->blend.usedBV = FALSE; /* clear state */
+ if ( !top->private_offset || !top->private_size )
+ goto Exit2; /* no private DICT, do nothing */
+
/* set defaults */
FT_ZERO( priv );