[fonttools/fonttools] 0521ee: raise TTLibError instead of assert in WOFF decode ...

1 view
Skip to first unread message

Cosimo Lupo

unread,
Sep 11, 2026, 5:06:57 AM (10 days ago) Sep 11
to fontto...@googlegroups.com
Branch: refs/heads/main
Home: https://github.com/fonttools/fonttools
Commit: 0521eee483cfb44a2f086f14f0e0a19a0ea12f1d
https://github.com/fonttools/fonttools/commit/0521eee483cfb44a2f086f14f0e0a19a0ea12f1d
Author: Mahammad Insaf <In...@digiscrypt.com>
Date: 2026-09-11 (Fri, 11 Sep 2026)

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

Log Message:
-----------
raise TTLibError instead of assert in WOFF decode path

The WOFF table and metadata size checks used bare asserts, which raise AssertionError rather than TTLibError and are dropped under python -O, so a corrupt WOFF was accepted with wrong-sized data. Mirrors the fromFile/loadData hardening for the WOFF-specific sites.


Commit: 3fb6622ad77b19b3e4492e85fe22088a74601cba
https://github.com/fonttools/fonttools/commit/3fb6622ad77b19b3e4492e85fe22088a74601cba
Author: Cosimo Lupo <cos...@anthrotype.com>
Date: 2026-09-11 (Fri, 11 Sep 2026)

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

Log Message:
-----------
Merge pull request #4178 from insaf021/woff-decode-ttliberror

[ttLib.sfnt] raise TTLibError not assert for WOFF decompressed sizes


Compare: https://github.com/fonttools/fonttools/compare/f16966c92ea6...3fb6622ad77b

To unsubscribe from these emails, change your notification settings at https://github.com/fonttools/fonttools/settings/notifications
Reply all
Reply to author
Forward
0 new messages