MCPcopy Create free account
hub / github.com/FuzzAnything/PromptFuzz / makeup_call_integer_arg

Method makeup_call_integer_arg

src/program/transform.rs:285–300  ·  view source on GitHub ↗
(&mut self, call: &Node, arg_pos: usize, ty: &str)

Source from the content-addressed store, hash-verified

283 }
284
285 fn makeup_call_integer_arg(&mut self, call: &Node, arg_pos: usize, ty: &str) -> Result<()> {
286 let c_ty_name = match ty {
287 "int8_t" => "int8_t",
288 "uint8_t" => "uint8_t",
289 "int16_t" | "short" => "int16_t",
290 "uint16_t" | "unsigned short" => "uint16_t",
291 "int32_t" | "int" => "int32_t",
292 "uint32_t" | "unsigned int" => "uint32_t",
293 "int64_t" | "long" | "long long" => "int64_t",
294 "uint64_t" | "unsigned long" | "unsigned long long" | "size_t" => "uint64_t",
295 _ => unimplemented!("{ty} unimplemented type"),
296 };
297 let fuzz_var = format!("fuzz_{c_ty_name}_{}", self.fuzzer_shim.get_init_id_inc());
298 self.change_call_arg(call, arg_pos, &fuzz_var)?;
299 Ok(())
300 }
301
302 pub fn seek_and_rewrite(&self, pos: usize, len: usize, str: &str) -> Result<()> {
303 let mut f = std::fs::OpenOptions::new()

Callers 1

Calls 1

change_call_argMethod · 0.80

Tested by

no test coverage detected