add afl fuzz target
This commit is contained in:
		
					parent
					
						
							
								78987f7ba3
							
						
					
				
			
			
				commit
				
					
						28c2bfbe8c
					
				
			
		
					 6 changed files with 367 additions and 0 deletions
				
			
		
							
								
								
									
										11
									
								
								tests/afl/src/gen.rs
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								tests/afl/src/gen.rs
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
use afl::fuzz;
 | 
			
		||||
 | 
			
		||||
fn main() {
 | 
			
		||||
    fuzz!(|data: &[u8]| {
 | 
			
		||||
        if let Ok(s) = std::str::from_utf8(data) {
 | 
			
		||||
            let p = jotdown::Parser::new(s);
 | 
			
		||||
            let mut output = String::new();
 | 
			
		||||
            jotdown::html::push(p, &mut output);
 | 
			
		||||
        }
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue