rust-fatfs icon indicating copy to clipboard operation
rust-fatfs copied to clipboard

Panic due to integer wrapping

Open evanrichter opened this issue 2 years ago • 0 comments

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

https://github.com/rafalh/rust-fatfs/blob/4892fb1791b29616d8573235eb83644003d13791/src/file.rs#L283

img.zip

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

evanrichter avatar Jul 02 '22 23:07 evanrichter