Function afl::handle_bytes
[−]
[src]
pub fn handle_bytes<F>(closure: F) where
F: FnOnce(Vec<u8>) + UnwindSafe,
Utility that reads a Vec
of bytes from standard input (stdin)
and passes it to closure
. All panics that occur within
closure
will be treated as aborts. This is done so that
AFL considers a panic to be a crash.
Examples
extern crate afl; fn main() { afl::handle_read(|read| { Image::parse(read) }) }