//! Structured fuzz over the kitty graphics protocol's APC bodies. //! //! The second half of the shop soak pair, and a separate target from `vt` //! rather than a mode of it: these are two grammars with no shared code and no //! dependency edge between their crates. `shop-vt` reads a byte stream with //! embedded state; this reads a body someone else has already delimited. The //! seam between them is in the shop binary, which is the only crate that links //! both. //! //! What is at stake here is not the parser's own memory, which is safe by //! construction (`#![deny(unsafe_code)]`), but what it hands the host: shop //! indexes a transmitted payload as pixels using dimensions the same untrusted //! body supplied. So the oracle is about payloads arriving intact and about //! answers a client can act on, not about not panicking. //! //! ## The oracle lives in the crate, not here //! //! Everything asserted is `kittygfx::oracle::check_bodies`. The committed //! regression replay in `tests/regressions.rs` calls the same function on //! stable, so a crash found here becomes a unit test by copying one file, and //! neither side can drift into checking less than the other. //! //! ## Input shape //! //! The input is split on ESC, with a leading `_` and a trailing `\` stripped //! from each piece, so a capture of what a real client sends is a seed as it //! stands. #![no_main] use libfuzzer_sys::fuzz_target; fuzz_target!(|data: &[u8]| { kittygfx::oracle::check_bodies(data); });