16 lines
451 B
Rust
16 lines
451 B
Rust
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use wgcloak::config::Config;
|
|
|
|
const MAX_INPUT: usize = 64 * 1024;
|
|
|
|
fuzz_target!(|input: &[u8]| {
|
|
let input = &input[..input.len().min(MAX_INPUT)];
|
|
// Parsing only: Config::from_str never reads secret files. Validation is
|
|
// intentionally not called because it may resolve file-backed secrets.
|
|
if let Ok(text) = std::str::from_utf8(input) {
|
|
let _ = Config::from_str(text);
|
|
}
|
|
});
|