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

[gsubgpos] Guard integer arithmetic against wrapping below zero #4934

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

alerque
Copy link
Member

@alerque alerque commented Nov 11, 2024

When either casting a signed integer to an unsigned one or subtracting a value from an unsigned one, add assertions to verify we will not end up below expected bounds.

This tracks the extra assertions added to Rustybuzz in harfbuzz/rustybuzz#146 subsequent to having found a bogus type casting in the Rust port via harfbuzz/rustybuzz#142.

@alerque
Copy link
Member Author

alerque commented Nov 14, 2024

@khaledhosny Is Circle just mad that I opened this PR from my fork instead of the org repo?

@khaledhosny
Copy link
Collaborator

@khaledhosny Is Circle just mad that I opened this PR from my fork instead of the org repo?

May be you didn’t give it the required permissions on your personal account?

When either casting a signed integer to an unsigned one or subtracting
a value from an unsigned one, add assertions to verify we will not end
up below expected bounds.
@alerque alerque force-pushed the assert-per-rustybuzz branch from 8c7bc63 to 1d1bfc5 Compare November 18, 2024 14:10
@behdad behdad merged commit 10cf348 into harfbuzz:main Nov 28, 2024
9 of 20 checks passed
@alerque alerque deleted the assert-per-rustybuzz branch November 29, 2024 07:01
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.

3 participants