Peltoche / ical-rs

Rust parser for ics (rfc5545) and vcard (rfc6350)
Apache License 2.0
110 stars 21 forks source link

Panics when fed invalid UTF-8 as input #45

Closed 5225225 closed 1 year ago

5225225 commented 3 years ago

To reproduce, feed the parser any invalid UTF-8.

My test was

fuzz_target!(|data: &[u8]| {
    let c = std::io::Cursor::new(data);
    for _ in ical::IcalParser::new(c) {}
});

The iterator is already over Result's to indicate errors, so I would expect invalid UTF-8 to be just an Err yielded.

Peltoche commented 1 year ago

Hello @5225225 , thanks for the report and sorry for the delay. I don't have much time to spend on this lib but I will take a look.