Closed ArniDagur closed 4 years ago
Looks good, thanks!
That sort of input is definitely not intended to crash things, I've added a fix. Will probably look into extending support for this for other input formats as well, seems quite convenient.
Thanks again.
This PR adds fuzzing for the project using
cargo fuzz
. I wrote an entrypoint for thesynapse-bencode
crate, which does adecode -> encode -> decode
roundtrip. You can run the fuzzer on said entrypoint using the command:cargo fuzz run bencode_roundtrip
.The fuzzer has discovered that some inputs make the crate go OOM, such as
d2222222222:l
. I'm not sure if that's a bug or not.