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

add guards for h->otl == NULL before calling otlSubtableAdd #1716

Merged
merged 3 commits into from
Sep 30, 2023

Conversation

josh-hadley
Copy link
Collaborator

Description

Add guards for h->otl == NULL in GSUB and GPOS code. Previously this was not explicitly checked, but could be NULL resulting in segfault.

Checklist:

  • I have followed the Contribution Guidelines
  • I have added test code and data to prove that my code functions correctly
  • 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

Copy link
Collaborator

@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

Testing in macOS 13.x revealed that there was no check for h->otl == NULL before calling otlSubtableAdd, which accesses h->otl in GPOSFill and GSUBFill routines. Without this check, otlSubtableAdd would fail with a segfault when h->otl was passed in NULL.

linter happiness
hotconv version
@josh-hadley josh-hadley changed the title add guards for h->otl == NULL before calling otlSubtableAdd @josh-hadley add guards for h->otl == NULL before calling otlSubtableAdd Sep 30, 2023
@josh-hadley josh-hadley merged commit 263b862 into develop Sep 30, 2023
9 checks passed
@josh-hadley josh-hadley deleted the jh-fix-otl-dnanext branch September 30, 2023 04:43
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.

2 participants