mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +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;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let iter: Vec<OsString> = [""].into_iter().map(|e| OsString::from(e)).collect();
|
||||
let it2 = iter.into_iter();
|
||||
uumain(it2);
|
||||
let delim: u8 = 0; // Null byte
|
||||
let args = data
|
||||
.split(|b| *b == delim)
|
||||
.filter_map(|e| std::str::from_utf8(e).ok())
|
||||
.map(|e| OsString::from(e));
|
||||
uumain(args);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue