Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address errors caused by attempting to read data when none exists #128

Merged
merged 2 commits into from
Dec 30, 2023

Conversation

bsweeney
Copy link
Member

No description provided.

- skip mapping 0xFFFF
- include glyphs mapped to gid 0 (missing character)
- check that the calculated offset to read a glyph exists in the file (can be caused by a bad subtable definition)
Before this change php-font-lib always read the number of contours for a glyph. If a glyph has no data the read information would be incorrect. This could lead to invalid parsing of the glyph since the data may not represent the actual glyph format (simple). In fact, the data could be from outside the glyf table entirely. If the glyph was positioned as the last byte in the font a read error would be thrown.
@bsweeney bsweeney merged commit 93a8d4b into master Dec 30, 2023
@bsweeney bsweeney deleted the fread-errors branch December 30, 2023 16:01
keulinho added a commit to shopware/conflicts that referenced this pull request May 8, 2024
There is a known bug in the font lib regarding loading fonts.
Conflict all versions that are not fixed.
refer to dompdf/php-font-lib#128
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant