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

Panic due to integer wrapping #72

Open
evanrichter opened this issue Jul 2, 2022 · 0 comments
Open

Panic due to integer wrapping #72

evanrichter opened this issue Jul 2, 2022 · 0 comments

Comments

@evanrichter
Copy link

The attached img file will cause the following subtraction to overflow:

let bytes_left_in_cluster = (cluster_size - offset_in_cluster) as usize;

img.zip

The application code can be seen here: https://github.com/evanrichter/rust-fatfs/blob/16f52f4d64c6d54ca9290f66e5167e1f2ddad552/fuzz/fuzz_targets/fs_load.rs

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