Closed
Description
My fuzzer for this was
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
if let Ok(value) = rasn::der::decode::<rasn::types::Open>(data) {
assert_eq!(value, rasn::der::decode(&rasn::der::encode(&value).unwrap()).unwrap());
}
});
Not sure if this a valid round fuzz test, feel free to close as invalid if not.
Reproducer is
fn main() {
let data = [
24, 19, 43, 53, 49, 54, 49, 53, 32, 32, 48, 53, 50, 52, 48, 57, 52, 48, 50, 48, 90,
];
let value = rasn::der::decode::<rasn::types::Open>(&data).expect("passes");
rasn::der::decode::<rasn::types::Open>(&rasn::der::encode(&value).unwrap()).expect("fails");
}
Fails with thread 'main' panicked at 'fails: NoValidChoice { name: "Open" }', src/main.rs:7:81