Function afl::read_stdio_bytes [] [src]

pub fn read_stdio_bytes<F>(closure: F) where
    F: Fn(Vec<u8>) + RefUnwindSafe
Deprecated since 0.3.3

: This function does not use the persistent mode and defered forkserver mode and is therefore very slow. Please use fuzz() or fuzz!() instead.

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::read_stdio_bytes(|read| {
        Image::parse(&read)
    })
}