Skip to content

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

Merged
behdad merged 1 commit intoharfbuzz:mainfrom
alerque:assert-per-rustybuzz
Nov 28, 2024
Merged

[gsubgpos] Guard integer arithmetic against wrapping below zero#4934
behdad merged 1 commit intoharfbuzz:mainfrom
alerque:assert-per-rustybuzz

Conversation

@alerque
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
@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