[glyf] Protect against an unlikely overflow

pull/3685/head
Behdad Esfahbod 3 years ago
parent 8537d68172
commit 2e9dbdcbbe
  1. 1
      src/OT/glyf/SimpleGlyph.hh

@ -171,6 +171,7 @@ struct SimpleGlyph
const HBUINT8 *p = &StructAtOffset<HBUINT8> (&endPtsOfContours[num_contours + 1],
endPtsOfContours[num_contours]);
if (unlikely ((const char *) p < bytes.arrayZ)) return false; /* Unlikely overflow */
const HBUINT8 *end = (const HBUINT8 *) (bytes.arrayZ + bytes.length);
/* Read flags */

Loading…
Cancel
Save