This repository has been archived on 2026-08-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
donglora/crates/donglora-cobs/fuzz/fuzz_targets/fuzz_decode.rs
T

10 lines
289 B
Rust

//! Fuzz target: feed arbitrary bytes to decode(). Must never panic.
#![no_main]
use libfuzzer_sys::fuzz_target;
fuzz_target!(|data: &[u8]| {
let mut buf = [0u8; 2048];
// Must not panic — may return None on invalid input.
let _ = donglora_cobs::decode(data, &mut buf);
});