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

Copy va_list for second use (and add va_end's to avoid leaking) #1512

Merged
merged 1 commit into from
Jun 1, 2022

Conversation

skef
Copy link
Collaborator

@skef skef commented Jun 1, 2022

Description

The error-printing code first tries to use a 128 byte buffer for output and then resizes if that fails. This code was mistakenly assuming the va_list wasn't altered as part of the call. This PR makes a copy va_list in case it is needed. It also adds va_end calls that were mistakenly left out of the original PR.

Closes #1504

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

@skef skef requested a review from josh-hadley June 1, 2022 00:08
Copy link
Collaborator

@josh-hadley josh-hadley left a comment

Choose a reason for hiding this comment

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

👍

@skef skef merged commit 8fe509a into adobe-type-tools:develop Jun 1, 2022
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.

No detailed error message for group mismatch
2 participants