diff --git a/libafl_nyx/src/executor.rs b/libafl_nyx/src/executor.rs index 6cea8c8d46..83689fcb84 100644 --- a/libafl_nyx/src/executor.rs +++ b/libafl_nyx/src/executor.rs @@ -55,6 +55,16 @@ where let bytes = input.target_bytes(); let buffer = bytes.as_slice(); + + if buffer.len() > self.helper.nyx_process.input_buffer_size() { + return Err(Error::illegal_state(format!( + "Input does not fit in the Nyx input buffer.\ + You may want to increase the Nyx input buffer size: {} > {}", + buffer.len(), + self.helper.nyx_process.input_buffer_size() + ))); + } + let size = u32::try_from(buffer.len()) .map_err(|_| Error::unsupported("Inputs larger than 4GB are not supported"))?;