aboutsummaryrefslogblamecommitdiffstats
path: root/fuzz/fuzz_targets/markdown.rs
blob: ca6d86bcceac9a91434a4983699c876ecad2275f (plain) (tree)
1
2
3
4
5
6
7
8
9

                               


                                              
                                     
                                                                             

                                                                          
                                                                      

     
#![no_main]
use libfuzzer_sys::fuzz_target;

fuzz_target!(|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());
    }
});