Context
cargo fuzz found various flaws that were fixed in 60e484b - that commit didn't include anything to reproduce or retest the relevant code and we'd like to add suitable tests.
The approach is likely to be similar to that used in #82 i.e.
- Create a suitable fuzz test target and run
cargo fuzz on an earlier commit than the one with the fix and ensure the fuzz testing causes at least one panic.
- Create unit tests that also cause the same
panic(s).
- Migrate these to the codebase with the fixes in the above commit and ensure the
panic(s) no longer occur.
- Submit these unit tests in a PR here.
Note: There's an interesting discussion in rust-fuzz/book#50 which includes several possible approaches to implementing tests into this codebase.