From fa63493ceeb1939d01d7bd91fc8b5a928943a5d7 Mon Sep 17 00:00:00 2001 From: Daniel Blackwell Date: Thu, 8 Jun 2023 15:25:20 +0100 Subject: [PATCH] Fix for issue with CommandExecutor when using InputLocation::StdIn (issue #1306) (#1308) Co-authored-by: dan --- libafl/src/executors/command.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libafl/src/executors/command.rs b/libafl/src/executors/command.rs index a92022f63f..43e161ddbf 100644 --- a/libafl/src/executors/command.rs +++ b/libafl/src/executors/command.rs @@ -132,8 +132,7 @@ impl CommandConfigurator for StdCommandConfigurator { Ok(cmd.spawn()?) } InputLocation::StdIn => { - self.command.stdin(Stdio::piped()).spawn()?; - let mut handle = self.command.spawn()?; + let mut handle = self.command.stdin(Stdio::piped()).spawn()?; let mut stdin = handle.stdin.take().unwrap(); if let Err(err) = stdin.write_all(input.target_bytes().as_slice()) { if err.kind() != std::io::ErrorKind::BrokenPipe {