mirror of
https://github.com/uutils/coreutils
synced 2024-12-13 23:02:38 +00:00
14 lines
313 B
Rust
14 lines
313 B
Rust
#![no_main]
|
|
use libfuzzer_sys::fuzz_target;
|
|
|
|
use std::ffi::OsString;
|
|
use uu_date::uumain;
|
|
|
|
fuzz_target!(|data: &[u8]| {
|
|
let delim: u8 = 0; // Null byte
|
|
let args = data
|
|
.split(|b| *b == delim)
|
|
.filter_map(|e| std::str::from_utf8(e).ok())
|
|
.map(OsString::from);
|
|
uumain(args);
|
|
});
|