libyaml-safer icon indicating copy to clipboard operation
libyaml-safer copied to clipboard

Panic: unexpected end of input

Open eduardosm opened this issue 1 year ago • 1 comments
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);

eduardosm avatar Aug 04 '24 13:08 eduardosm

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).

simonask avatar Aug 25 '24 09:08 simonask