From 47806df18b1c93bbfb9c338dee2147089c02d1d8 Mon Sep 17 00:00:00 2001 From: Teddy Heinen Date: Sat, 3 Sep 2022 20:51:11 -0400 Subject: [PATCH] Adjust NyxExecutor trait bound to HasTargetBytes from HasBytesVec (#760) * adjust NyxExecutor trait bound to HasTargetBytes from HasBytesVec * oops actually use HasTargetBytes instead --- libafl_nyx/src/executor.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libafl_nyx/src/executor.rs b/libafl_nyx/src/executor.rs index 538a778b55..b75e477274 100644 --- a/libafl_nyx/src/executor.rs +++ b/libafl_nyx/src/executor.rs @@ -1,8 +1,9 @@ use std::{fmt::Debug, marker::PhantomData}; use libafl::{ + bolts::AsSlice, executors::{Executor, ExitKind, HasObservers}, - inputs::{HasBytesVec, Input}, + inputs::{HasTargetBytes, Input}, observers::ObserversTuple, Error, }; @@ -30,7 +31,7 @@ impl<'a, I, S, OT> Debug for NyxExecutor<'a, I, S, OT> { impl<'a, EM, I, S, Z, OT> Executor for NyxExecutor<'a, I, S, OT> where - I: Input + HasBytesVec, + I: Input + HasTargetBytes, { fn run_target( &mut self, @@ -39,7 +40,8 @@ where _mgr: &mut EM, input: &I, ) -> Result { - let input = input.bytes(); + let input_owned = input.target_bytes(); + let input = input_owned.as_slice(); self.helper.nyx_process.set_input(input, input.len() as u32); // exec will take care of trace_bits, so no need to reset