mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 09:34:05 +01:00
[post] Protect against huge empty tables
This commit is contained in:
1 parent
5ed816ab59
commit
7d91f07edf
1 file changed
+3
-1
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user