[glyf] Adjust a check-range
This commit is contained in:
parent
db039d97ff
commit
f897978f21
|
@ -155,7 +155,7 @@ struct SimpleGlyph
|
|||
{
|
||||
const HBUINT16 *endPtsOfContours = &StructAfter<HBUINT16> (header);
|
||||
int num_contours = header.numberOfContours;
|
||||
if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours + 1]))) return false;
|
||||
if (unlikely (!bytes.check_range (&endPtsOfContours[num_contours - 1]))) return false;
|
||||
unsigned int num_points = endPtsOfContours[num_contours - 1] + 1;
|
||||
|
||||
points_.resize (num_points);
|
||||
|
|
Loading…
Reference in New Issue