mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
add more fuzzers
Many thanks to Jemma Nelson @fwip
This commit is contained in:
parent
e553a4a21c
commit
ef0b177e18
4 changed files with 54 additions and 0 deletions
|
@ -27,3 +27,21 @@ name = "fuzz_date"
|
|||
path = "fuzz_targets/fuzz_date.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_parse_glob"
|
||||
path = "fuzz_targets/fuzz_parse_glob.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_parse_size"
|
||||
path = "fuzz_targets/fuzz_parse_size.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
||||
[[bin]]
|
||||
name = "fuzz_parse_time"
|
||||
path = "fuzz_targets/fuzz_parse_time.rs"
|
||||
test = false
|
||||
doc = false
|
||||
|
|
12
fuzz/fuzz_targets/fuzz_parse_glob.rs
Normal file
12
fuzz/fuzz_targets/fuzz_parse_glob.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// spell-checker:ignore libfuzzer
|
||||
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use uucore::parse_glob;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
_ = parse_glob::from_str(s)
|
||||
}
|
||||
});
|
12
fuzz/fuzz_targets/fuzz_parse_size.rs
Normal file
12
fuzz/fuzz_targets/fuzz_parse_size.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// spell-checker:ignore libfuzzer
|
||||
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use uucore::parse_size::parse_size;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
_ = parse_size(s);
|
||||
}
|
||||
});
|
12
fuzz/fuzz_targets/fuzz_parse_time.rs
Normal file
12
fuzz/fuzz_targets/fuzz_parse_time.rs
Normal file
|
@ -0,0 +1,12 @@
|
|||
// spell-checker:ignore libfuzzer
|
||||
|
||||
#![no_main]
|
||||
|
||||
use libfuzzer_sys::fuzz_target;
|
||||
use uucore::parse_time;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
if let Ok(s) = std::str::from_utf8(data) {
|
||||
_ = parse_time::from_str(s);
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue