[glyf] Fix byterange check again
This commit is contained in:
parent
20572f914c
commit
34c6c0193c
|
@ -180,7 +180,8 @@ struct SimpleGlyph
|
|||
const HBUINT16 *endPtsOfContours = &StructAfter<HBUINT16> (header);
|
||||
int num_contours = header.numberOfContours;
|
||||
assert (num_contours);
|
||||
if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours - 1]))) return false;
|
||||
/* One extra item at the end, for the instruction-count below. */
|
||||
if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours]))) return false;
|
||||
unsigned int num_points = endPtsOfContours[num_contours - 1] + 1;
|
||||
|
||||
points_.alloc (num_points + 4); // Allocate for phantom points, to avoid a possible copy
|
||||
|
|
Loading…
Reference in New Issue