[fonttools/fonttools] 8a55ee: Raise TTLibError on a truncated table directory

1 view
Skip to first unread message

Cosimo Lupo

unread,
Aug 11, 2026, 10:29:54 AMAug 11
to fontto...@googlegroups.com
Branch: refs/heads/truncated-table-directory-ttliberror
Home: https://github.com/fonttools/fonttools
Commit: 8a55eeb9585e978b71b31362c520a8a7ac0db297
https://github.com/fonttools/fonttools/commit/8a55eeb9585e978b71b31362c520a8a7ac0db297
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-08-11 (Tue, 11 Aug 2026)

Changed paths:
M Lib/fontTools/ttLib/sfnt.py
M Tests/ttLib/sfnt_test.py

Log Message:
-----------
Raise TTLibError on a truncated table directory

DirectoryEntry.fromFile unpacked whatever it read, so a file cut short
inside the directory (or one with a corrupt numTables, as happens when a
font is fuzzed) escaped as struct.error rather than TTLibError.



To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications

Cosimo Lupo

unread,
Aug 20, 2026, 8:02:54 AM (7 days ago) Aug 20
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 8a55eeb9585e978b71b31362c520a8a7ac0db297
https://github.com/fonttools/fonttools/commit/8a55eeb9585e978b71b31362c520a8a7ac0db297
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-08-11 (Tue, 11 Aug 2026)

Changed paths:
M Lib/fontTools/ttLib/sfnt.py
M Tests/ttLib/sfnt_test.py

Log Message:
-----------
Raise TTLibError on a truncated table directory

DirectoryEntry.fromFile unpacked whatever it read, so a file cut short
inside the directory (or one with a corrupt numTables, as happens when a
font is fuzzed) escaped as struct.error rather than TTLibError.


Commit: 62d182f7b515f5f2e2ce43c7201085dab667780e
https://github.com/fonttools/fonttools/commit/62d182f7b515f5f2e2ce43c7201085dab667780e
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-08-20 (Thu, 20 Aug 2026)

Changed paths:
M Lib/fontTools/ttLib/sfnt.py
M Tests/ttLib/sfnt_test.py

Log Message:
-----------
Merge pull request #4149 from fonttools/truncated-table-directory-ttliberror

Raise TTLibError on a truncated table directory


Compare: https://github.com/fonttools/fonttools/compare/547d25785c8d...62d182f7b515
Reply all
Reply to author
Forward
0 new messages