[post] Fix bound checking

This commit is contained in:
Behdad Esfahbod 2018-11-07 09:10:55 -05:00
parent 7ec694ddf2
commit 64f0becd89
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ struct post
pool = &StructAfter<uint8_t> (v2.glyphNameIndex); pool = &StructAfter<uint8_t> (v2.glyphNameIndex);
const uint8_t *end = (uint8_t *) table + table_length; 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); index_to_offset.push (data - pool);
} }
inline void fini (void) inline void fini (void)