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

[tx] ignore subr recursion limit #1484

Merged
merged 3 commits into from
Mar 16, 2022
Merged

Conversation

josh-hadley
Copy link
Collaborator

@josh-hadley josh-hadley commented Mar 15, 2022

Description

This PR updates t2cstr which handles various tx -cff duties. Previously, when dumping a font whose CFF table exceeded subroutine (or gsubr) recursion limits, tx would emit an error message and generate a zero-length file. This update still prints a message, but clarifies that it is ignoring the condition (as is the case for several other out-of-bounds font values) and continues the dump of the out-of-bounds data. It also updates the formatting of the message slightly.

Fixes #1482

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly I haven't done this because the only test data I have available is a private font which cannot be added to this open source repo.
  • I have verified that new and existing tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

kaydeearts
kaydeearts previously approved these changes Mar 15, 2022
Copy link
Collaborator

@kaydeearts kaydeearts left a comment

Choose a reason for hiding this comment

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

👍

@miguelsousa
Copy link
Member

Should this line get removed?

CTL_DCL_ERR(t2cErrSubrDepth, "subr recursion level limit exceeded")

@josh-hadley
Copy link
Collaborator Author

Should this line get removed?

Yes, nothing references that now. Done in 82c4128 . Thanks for catching that 😄

@josh-hadley josh-hadley merged commit cae8c0c into develop Mar 16, 2022
@josh-hadley josh-hadley deleted the jh-tx-ignore-subr-recurse-limit branch March 16, 2022 01:28
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.

[tx] conditionally ignore subroutine recursion limit
3 participants