Skip to content

parsettf.c: fix handling of invalid/0 CFF offsets#4669

Merged
jtanx merged 2 commits intofontforge:masterfrom
jtanx:cid
Mar 19, 2021
Merged

parsettf.c: fix handling of invalid/0 CFF offsets#4669
jtanx merged 2 commits intofontforge:masterfrom
jtanx:cid

Conversation

@jtanx
Copy link
Copy Markdown
Contributor

@jtanx jtanx commented Mar 16, 2021

Instead of checking against -1, check that the offset is greater
than 0; a 0 offset would imply reading the same data again which
doesn't make sense. (There are some cases which are special cased and 0 has some special meaning, I've left those alone and only changed ones which immediately fseek).

Fixes #4667

Type of change

  • Bug fix

Instead of checking against -1, check that the offset is greater
than 0; a 0 offset would imply reading the same data again which
doesn't make sense.

Fixes fontforge#4667
Copy link
Copy Markdown
Contributor

@skef skef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jtanx jtanx merged commit 25c3b74 into fontforge:master Mar 19, 2021
@jtanx jtanx deleted the cid branch March 19, 2021 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FontForge crashing when trying to extract fonts from a particular pdf

2 participants