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

Integer arithmetic/casting audit #20

Open
cole-miller opened this issue Jul 28, 2022 · 1 comment
Open

Integer arithmetic/casting audit #20

cole-miller opened this issue Jul 28, 2022 · 1 comment

Comments

@cole-miller
Copy link
Contributor

No description provided.

@cole-miller
Copy link
Contributor Author

cole-miller commented Aug 14, 2022

I've eliminated unchecked integer arithmetic from sndjvu_format::ser, except for a few innocuous uses:

#![deny(clippy::integer_arithmetic)]

This is important because most of the arithmetic in that module goes to calculating values for various length/offset fields in the transfer format, and if one of those calculations overflows we want to signal an error rather than serialize a broken document.

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

No branches or pull requests

1 participant