MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / replace_slice_strided

Function replace_slice_strided

hail-fuzz/src/utils.rs:127–134  ·  view source on GitHub ↗
(input: &mut Vec<u8>, x: &[u8], offset: usize, stride: usize)

Source from the content-addressed store, hash-verified

125}
126
127pub fn replace_slice_strided(input: &mut Vec<u8>, x: &[u8], offset: usize, stride: usize) {
128 let len = x.len() * stride;
129
130 input.resize(usize::max(offset + x.len() * stride, input.len()), 0);
131 for (chunk, byte) in input[offset..offset + len].chunks_exact_mut(stride).zip(x) {
132 chunk.fill(*byte);
133 }
134}
135
136pub fn select_random_non_empty_stream<'a, R>(
137 rng: &mut R,

Callers 5

apply_mutationFunction · 0.85
replace_stridedFunction · 0.85
replace_strided_middleFunction · 0.85
replace_strided_endFunction · 0.85
apply_simpleMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by 3

replace_stridedFunction · 0.68
replace_strided_middleFunction · 0.68
replace_strided_endFunction · 0.68