[post] Protect against huge empty tables
This commit is contained in:
parent
5ed816ab59
commit
7d91f07edf
|
@ -128,7 +128,9 @@ struct post
|
|||
pool = &StructAfter<uint8_t> (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;
|
||||
index_to_offset.len < 65535 && data < end && data + *data < end;
|
||||
data += 1 + *data)
|
||||
index_to_offset.push (data - pool);
|
||||
}
|
||||
inline void fini (void)
|
||||
|
|
Loading…
Reference in New Issue