16 lines
506 B
Rust
16 lines
506 B
Rust
#![no_main]
|
|
|
|
use libfuzzer_sys::fuzz_target;
|
|
use wgcloak::protocol::direct::parse_packet_bounded;
|
|
|
|
const MAX_INPUT: usize = 64 * 1024;
|
|
const MAX_DATA_PAYLOAD: usize = 16 * 1024;
|
|
|
|
fuzz_target!(|input: &[u8]| {
|
|
// Keep the harness itself bounded even if the engine is configured with a
|
|
// larger input size. The parser performs structural checks before copying
|
|
// DATA payloads.
|
|
let input = &input[..input.len().min(MAX_INPUT)];
|
|
let _ = parse_packet_bounded(input, MAX_DATA_PAYLOAD);
|
|
});
|