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

[read-fonts] avoid overflow in midpoint computation #1282

Merged
merged 3 commits into from
Dec 10, 2024
Merged

Conversation

dfrg
Copy link
Member

@dfrg dfrg commented Dec 10, 2024

// Original overflowing code was: (a + b) / 2
// Choose wrapping arithmetic here because we shouldn't ever
// hit this outside of fuzzing or broken fonts _and_ this is
// called from very performance sensitive code
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a good comment. It would be great if it said what specific performance sensitive code.

@dfrg dfrg merged commit e7161e7 into main Dec 10, 2024
10 checks passed
@dfrg dfrg deleted the fix-midpoint-overflow branch December 10, 2024 18:27
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.

Add overflow in contour path extraction, reported by fuzzer
2 participants