aboutsummaryrefslogtreecommitdiff
path: root/fuzz/fuzz_targets/decode_does_not_panic.rs
blob: fd6efecf26463c856903836957f549f946b2933f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![no_main]
#[macro_use] extern crate libfuzzer_sys;
extern crate yaxpeax_x86;

fuzz_target!(|data: &[u8]| {
    let x86_64_decoder = yaxpeax_x86::long_mode::InstDecoder::default();
    let x86_32_decoder = yaxpeax_x86::protected_mode::InstDecoder::default();
    let x86_16_decoder = yaxpeax_x86::real_mode::InstDecoder::default();
    x86_64_decoder.decode_slice(data).expect("is ok");
    x86_32_decoder.decode_slice(data).expect("is ok");
    x86_16_decoder.decode_slice(data).expect("is ok");
});