libyaml-safer
libyaml-safer copied to clipboard
Panic: unexpected end of input
trafficstars
Minimal reproducer:
let mut data: &[u8] = b"a: ''|\n 0";
let mut parser = libyaml_safer::Parser::new();
parser.set_input_string(&mut data);
let _ = libyaml_safer::Document::load(&mut parser);
It would be helpful to know if the behavior is different here from unsafe-libyaml. This library is intended to be "bug-for-bug" compatible, so that's important (but that doesn't mean we can't do something better, like not panic).