ref: 545a481a74a3c3b70af8928793a01a84f8b0ee9b
parent: 1e9229f0fcb46fd4cd8e0fdc48fb4a44ddb7a8a1
author: Werner Lemberg <[email protected]>
date: Thu Oct 10 09:11:06 EDT 2019
* src/sfnt/sfwoff2.c (reconstruct_glyf): Check `triplet_size'. Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18108
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,17 @@
+2019-10-10 Werner Lemberg <[email protected]>
+
+ * src/sfnt/sfwoff2.c (reconstruct_glyf): Check `triplet_size'.
+
+ Reported as
+
+ https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18108
+
2019-10-09 John Tytgat <[email protected]>
[cff] Fix FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts (#57023).
- * src/cff/cffobjs.c (cff_face_init): Don't set FT_FACE_FLAG_GLYPH_NAMES
- for CFF2 based fonts.
+ * src/cff/cffobjs.c (cff_face_init): Don't set
+ FT_FACE_FLAG_GLYPH_NAMES for CFF2 based fonts.
2019-10-08 Werner Lemberg <[email protected]>
--- a/src/sfnt/sfwoff2.c
+++ b/src/sfnt/sfwoff2.c
@@ -1070,6 +1070,11 @@
flags_buf = stream->base + substreams[FLAG_STREAM].offset;
triplet_buf = stream->base + substreams[GLYPH_STREAM].offset;
+ if ( substreams[GLYPH_STREAM].size <
+ ( substreams[GLYPH_STREAM].offset -
+ substreams[GLYPH_STREAM].start ) )
+ goto Fail;
+
triplet_size = substreams[GLYPH_STREAM].size -
( substreams[GLYPH_STREAM].offset -
substreams[GLYPH_STREAM].start );