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

Avoid integer overflow when summing coefficients #206

Merged
merged 1 commit into from
Dec 3, 2021

Conversation

5225225
Copy link
Contributor

@5225225 5225225 commented Nov 2, 2021

Fixes image-rs/image#1509

Should this be a checked_add or a wrapping add where we just return something? There looks to be a similar PR https://github.com/image-rs/jpeg-decoder/pull/64/files which did just do a wrapping_add, should this match?

@HeroicKatora HeroicKatora merged commit 322ed1c into image-rs:master Dec 3, 2021
@5225225 5225225 deleted the sub-with-overflow-coeff branch December 3, 2021 17:18
wartmanm pushed a commit to wartmanm/jpeg-decoder that referenced this pull request Sep 15, 2022
Avoid integer overflow when summing coefficients
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.

panicked at 'attempt to subtract with overflow'
2 participants