Branch: refs/heads/main
Home:
https://github.com/fonttools/fonttools
Commit: 025e1b6b0eec0e9c10b6c78004cbc9673529a498
https://github.com/fonttools/fonttools/commit/025e1b6b0eec0e9c10b6c78004cbc9673529a498
Author: eeshsaxena <
chinm...@gmail.com>
Date: 2026-08-15 (Sat, 15 Aug 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Raise TTLibError for a truncated or out-of-bounds cmap subtable header
table__c_m_a_p.decompile read the cmap header, the subtable directory and each
subtable's format/length with struct.unpack on slices that a malformed font can
push past the end of the data, surfacing a raw struct.error. Guard the header
reads (table length, directory entries, and the per-format header) so they
raise TTLibError like the rest of the loader.
Commit: 23514fd07e62bff9738dbded070094ca4f025888
https://github.com/fonttools/fonttools/commit/23514fd07e62bff9738dbded070094ca4f025888
Author: eeshsaxena <
eeshs...@gmail.com>
Date: 2026-08-19 (Wed, 19 Aug 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Widen the cmap header fix per review
Read subtableOffset as the unsigned Offset32 it is (>HHL, matching the
compile side), so the old signed 'offset < 0' branch is now dead and
removed. Also validate the subtable length against the data: too small
for the format's fixed header, or longer than what is present, now raise
TTLibError rather than a struct.error or an assert that vanishes under
python -O. The truncated-header test uses subTest with message matching
and covers the 0xFFFFFFFF offset plus both length cases.
Commit: 79faddb1e052ecc920285bc71d7ab6649be3fb7d
https://github.com/fonttools/fonttools/commit/79faddb1e052ecc920285bc71d7ab6649be3fb7d
Author: Cosimo Lupo <
cos...@anthrotype.com>
Date: 2026-08-20 (Thu, 20 Aug 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Derive the cmap subtable header size from the subtable class
Each class now carries the struct format of the fixed header its
decompileHeader unpacks, so decompile can calcsize it instead of keeping a
second hardcoded table in sync. cmap_format_unknown's is empty: formats 8, 10
and anything unrecognised keep the body verbatim and have no minimum.
Also hoist struct in the test module rather than importing it per method.
Commit: 9e17756ed0fd24c92fa213e960e386f57095cc7d
https://github.com/fonttools/fonttools/commit/9e17756ed0fd24c92fa213e960e386f57095cc7d
Author: Cosimo Lupo <
cos...@anthrotype.com>
Date: 2026-08-20 (Thu, 20 Aug 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Raise TTLibError for a corrupt format 12 or 13 subtable header
The assert in decompileHeader was the last header check still raising
AssertionError, which python -O drops, leaving a subtable whose nGroups does
not match its length. Split it into two errors carrying the numbers.
Commit: c765b62c1bf251140a8da4f4ce51701b1caffb39
https://github.com/fonttools/fonttools/commit/c765b62c1bf251140a8da4f4ce51701b1caffb39
Author: Cosimo Lupo <
cos...@anthrotype.com>
Date: 2026-08-20 (Thu, 20 Aug 2026)
Changed paths:
M Lib/fontTools/ttLib/tables/_c_m_a_p.py
M Tests/ttLib/tables/_c_m_a_p_test.py
Log Message:
-----------
Merge pull request #4151 from eeshsaxena/fix/cmap-truncated-header
Raise TTLibError for a truncated or out-of-bounds cmap subtable header
Compare:
https://github.com/fonttools/fonttools/compare/883aba79a7ec...c765b62c1bf2
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications