aboutsummaryrefslogtreecommitdiffstats
path: root/fuzz/fuzz_targets/micromark.rs
blob: 2137e0e75d5883fcd791d40781b318acb93d9236 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#![no_main]
use libfuzzer_sys::fuzz_target;
extern crate micromark;

fuzz_target!(|data: &[u8]| {
    if let Ok(s) = std::str::from_utf8(data) {
        let _ = micromark::micromark(s);
        let _ = micromark::micromark_with_options(
            s,
            &micromark::Options::gfm()
        );
        let _ = micromark::micromark_to_mdast(s, &micromark::ParseOptions::default());
        let _ = micromark::micromark_to_mdast(s, &micromark::ParseOptions::gfm());
    }
});