diff --git a/src/OT/glyf/SimpleGlyph.hh b/src/OT/glyf/SimpleGlyph.hh index 338a63050..f09fda1cb 100644 --- a/src/OT/glyf/SimpleGlyph.hh +++ b/src/OT/glyf/SimpleGlyph.hh @@ -157,6 +157,7 @@ struct SimpleGlyph { const HBUINT16 *endPtsOfContours = &StructAfter (header); int num_contours = header.numberOfContours; + assert (num_contours); if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours - 1]))) return false; unsigned int num_points = endPtsOfContours[num_contours - 1] + 1;