Branch: refs/heads/main
Home:
https://github.com/fonttools/fonttools
Commit: 42f47ccdc5e6d09da38049d0e8840ab0498ed082
https://github.com/fonttools/fonttools/commit/42f47ccdc5e6d09da38049d0e8840ab0498ed082
Author: Erfouni <
erfan.moh...@gmail.com>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Lib/fontTools/svgLib/path/parser.py
M Tests/svgLib/path/parser_test.py
Log Message:
-----------
svgLib.path: raise ValueError, not IndexError, on a truncated command
parse_path consumed each drawto command's coordinates with elements.pop(), so
a command with too few numbers (e.g. "M0,0 L5") popped an empty list and raised
a bare "IndexError: pop from empty list". The parser already reports other
malformed input with a clear ValueError (a missing initial moveto, an unallowed
implicit command), so route the coordinate pops through a small helper that
raises ValueError naming the offending command instead. Arc commands are
already validated during tokenization, so they are unaffected. Added a test.
Commit: f88b5dfd8367038730645144124beebcb3ce6cb6
https://github.com/fonttools/fonttools/commit/f88b5dfd8367038730645144124beebcb3ce6cb6
Author: Cosimo Lupo <
cos...@anthrotype.com>
Date: 2026-10-07 (Wed, 07 Oct 2026)
Changed paths:
M Lib/fontTools/svgLib/path/parser.py
M Tests/svgLib/path/parser_test.py
Log Message:
-----------
Merge pull request #4254 from Erfouni/svglib-truncated-command-valueerror
svgLib.path: raise a clear ValueError instead of IndexError on a truncated command
Compare:
https://github.com/fonttools/fonttools/compare/18a95026b882...f88b5dfd8367
To unsubscribe from these emails, change your notification settings at
https://github.com/fonttools/fonttools/settings/notifications