diff --git a/libafl/src/inputs/multi.rs b/libafl/src/inputs/multi.rs index 7ebdd0f2c5..55353faa4c 100644 --- a/libafl/src/inputs/multi.rs +++ b/libafl/src/inputs/multi.rs @@ -154,12 +154,16 @@ where I: Input, { fn generate_name(&self, id: Option) -> String { - self.names - .iter() - .cloned() - .zip(self.parts.iter().map(|i| i.generate_name(id))) - .map(|(name, generated)| format!("{name}-{generated}")) - .collect::>() - .join(",") + if self.names().len() > 0 { + self.names + .iter() + .cloned() + .zip(self.parts.iter().map(|i| i.generate_name(id))) + .map(|(name, generated)| format!("{name}-{generated}")) + .collect::>() + .join(",") + } else { + "empty_multipart".to_string() // empty strings cause issues with OnDiskCorpus + } } }