kornelski / lodepng-rust

All-in-one PNG image encoder/decoder in pure Rust
https://lib.rs/lodepng
zlib License
100 stars 23 forks source link

Add support for fuzzing #29

Closed Shnatsel closed 6 years ago

Shnatsel commented 6 years ago

If you do not wish to have "fuzz" folder within the project, I can put it in https://github.com/rust-fuzz/targets repository instead.

kornelski commented 6 years ago

Thank you.

kornelski commented 6 years ago

The fix for it was trivial — deletion of one line: https://github.com/kornelski/lodepng-rust/commit/37a7bccc0a2df94a7ee6eb7cfc1be3192f4d024d

And the leak existed there only because this crate keeps ABI compatibility with its C version, so it has to malloc strings. I'll probably drop the ABI compatibility, because Vec<String> would make things so much simpler.

Shnatsel commented 6 years ago

I feel C ABI compatibility is a major selling point of this crate compared to something Rust-only, such as png crate.