mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-25 17:01:17 +01:00
[glyf] Fix byterange check again
This commit is contained in:
1 parent
20572f914c
commit
34c6c0193c
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user