MCPcopy Create free account
hub / github.com/ElementsProject/lightning / cross_over

Function cross_over

tests/fuzz/libfuzz.c:135–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135size_t cross_over(const u8 *in1, size_t in1_size, const u8 *in2,
136 size_t in2_size, u8 *out, size_t max_out_size, unsigned seed)
137{
138 srand(seed);
139 if (rand() % 2)
140 return insert_part(in1, in1_size, in2, in2_size, out,
141 max_out_size);
142 return overwrite_part(in1, in1_size, in2, in2_size, out, max_out_size);
143}
144
145/* In non-fuzzing builds, these become unit tests which just run the corpora:
146 * this is also good for attaching a debugger to! */

Callers 3

Calls 2

insert_partFunction · 0.85
overwrite_partFunction · 0.85

Tested by

no test coverage detected