mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Try to fuzz for real
This commit is contained in:
parent
69f420cb01
commit
234ef07abd
1 changed files with 6 additions and 3 deletions
|
@ -7,7 +7,10 @@ use std::ffi::OsString;
|
||||||
use uu_date::uumain;
|
use uu_date::uumain;
|
||||||
|
|
||||||
fuzz_target!(|data: &[u8]| {
|
fuzz_target!(|data: &[u8]| {
|
||||||
let iter: Vec<OsString> = [""].into_iter().map(|e| OsString::from(e)).collect();
|
let delim: u8 = 0; // Null byte
|
||||||
let it2 = iter.into_iter();
|
let args = data
|
||||||
uumain(it2);
|
.split(|b| *b == delim)
|
||||||
|
.filter_map(|e| std::str::from_utf8(e).ok())
|
||||||
|
.map(|e| OsString::from(e));
|
||||||
|
uumain(args);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue