forge
Explore
Log in

Don't you dare go Hollow

edith_codecs

Clone
★ 0

0 watching0 forksRust375.8 MiB76482dfTahinli19 minutes ago4210 commits

events.rs18 lines, 684 bytesHistoryRawDownload
1#![no_main]
2
3use ec_subs::plain_text;
4use libfuzzer_sys::fuzz_target;
5
6// The `[Events]` table with the input as one Dialogue row, so Start/End/Style/Text splitting and
7// the clock parse are reached on every input. Whole-document rows without a Format line are
8// covered by the script target.
9fuzz_target!(|data: &[u8]| {
10 let mut doc = b"[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\nDialogue: ".to_vec();
11 doc.extend_from_slice(data);
12 if let Ok(track) = ec_ass::parse(&doc) {
13 for cue in &track.cues {
14 assert!(cue.end_us >= cue.start_us);
15 let _ = plain_text(&cue.segments);
16 }
17 }
18});