rust-fuzz/targets

fuzz_serde_yaml_read_write_read should error like fuzz_serde_json_read_write_read

mikeando opened this issue · 1 comments

At the moment failure to reserialize the YAML in fuzz_serde_yaml_read_write_read is not flagged as an error, while in fuzz_serde_json_read_write_read it is an error.

The difference is

let serialized = serde_json::to_vec(&value).unwrap();

vs

let serialized = match serde_yaml::to_vec(&value) {
    Ok(s) => s,
    Err(_) => return,
};

I'd argue that it should be a failure in both cases.

yep, it should be an unwrap in both cases 👍