From 64f0becd89cc2b0136c7dc1609abc9f957525cf8 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 Nov 2018 09:10:55 -0500 Subject: [PATCH] [post] Fix bound checking --- src/hb-ot-post-table.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index b15a459b1..1772a10c1 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -124,7 +124,7 @@ struct post pool = &StructAfter (v2.glyphNameIndex); const uint8_t *end = (uint8_t *) table + table_length; - for (const uint8_t *data = pool; data < end && data + *data <= end; data += 1 + *data) + for (const uint8_t *data = pool; data < end && data + *data < end; data += 1 + *data) index_to_offset.push (data - pool); } inline void fini (void)