mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-26 20:40:51 +00:00
Add fuzzer for DateTime::parse_from_str
This commit is contained in:
parent
d1de1d95ea
commit
361b9fc61e
@ -22,3 +22,7 @@ members = ["."]
|
||||
[[bin]]
|
||||
name = "fuzz_reader"
|
||||
path = "fuzz_targets/fuzz_reader.rs"
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_format"
|
||||
path = "fuzz_targets/fuzz_format.rs"
|
||||
|
7
fuzz/fuzz_targets/fuzz_format.rs
Normal file
7
fuzz/fuzz_targets/fuzz_format.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#![no_main]
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
|
||||
fuzz_target!(|data: (String, String)| {
|
||||
use chrono::prelude::*;
|
||||
let _ = DateTime::parse_from_str(&data.0, &data.1);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user