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

Function is_fuzzable_array_ty

src/program/gadget.rs:863–879  ·  view source on GitHub ↗

Whether this ty is array and is able to receive fuzzer's mutable bytes (considered as fuzzable). 1. must be const qualified array. 2. the array elements must be primitive types.

(ty: &str)

Source from the content-addressed store, hash-verified

861 /// 1. must be const qualified array.
862 /// 2. the array elements must be primitive types.
863 pub fn is_fuzzable_array_ty(ty: &str) -> bool {
864 if is_const_pointer_ty(ty) {
865 let inner = get_pointer_inner(ty).expect("expect not fail.");
866 if is_primitive_type(inner) {
867 return true;
868 }
869 if !is_const_pointer_ty(inner) {
870 return false;
871 }
872 // only consider a maximal depth of 2.
873 let inner = get_pointer_inner(inner).expect("expect not fail.");
874 if is_primitive_type(inner) {
875 return true;
876 }
877 }
878 false
879 }
880
881 fn get_integer_ty_identifier(ty: &str) -> &str {
882 match ty {

Callers 4

is_fuzzableMethod · 0.85
get_fuzzable_paramsMethod · 0.85

Calls 3

is_const_pointer_tyFunction · 0.85
get_pointer_innerFunction · 0.85
is_primitive_typeFunction · 0.85

Tested by

no test coverage detected