aboutsummaryrefslogtreecommitdiffstats
path: root/askama_parser/fuzz/fuzz_targets/fuzz_parser.rs
blob: 1be1f94d8e2e06066bd3256cc1fd57a82befc07c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#![no_main]
use askama_parser::*;
use libfuzzer_sys::fuzz_target;
use std::str;

fuzz_target!(|data: &[u8]| {
    // fuzzed code goes here
    if let Ok(data) = str::from_utf8(data) {
        if let Ok(_) = Ast::from_str(data, &Syntax::default()) {}
    }
});