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















                                                         
#![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 {
                constructs: micromark::Constructs::gfm(),
                ..micromark::Options::default()
            },
        );
    }
});