chinedufn / psd

A Rust API for parsing and working with PSD files.
https://chinedufn.github.io/psd
Apache License 2.0
265 stars 40 forks source link

No overflow protection for `i32 as usize` in this crate #45

Open namse opened 1 year ago

namse commented 1 year ago

I found that some codes change i32 to usize without any overflow protection, like https://github.com/chinedufn/psd/blob/5276ab762addfc6eeb711cbb35cbb7c12a472a2d/src/sections/layer_and_mask_information_section/layer.rs#L436

I am facing the overflow error on my product.