aboutsummaryrefslogblamecommitdiffstats
path: root/fuzz/fuzz_targets/markdown_honggfuzz.rs
blob: 6aa3c79ec7b08797508f639d84d8661ff282f402 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                     
use honggfuzz::fuzz;

fn main() {
    loop {
        fuzz!(|data: &[u8]| {
            if let Ok(s) = std::str::from_utf8(data) {
                let _ = markdown::to_html(s);
                let _ = markdown::to_html_with_options(s, &markdown::Options::gfm());
                let _ = markdown::to_mdast(s, &markdown::ParseOptions::default());
                let _ = markdown::to_mdast(s, &markdown::ParseOptions::gfm());
                let _ = markdown::to_mdast(s, &markdown::ParseOptions::mdx());
            }
        });
    }
}