Skip to content

Commit bdb32e6

Browse files
yamilmoralescopybara-github
authored andcommitted
No public description
PiperOrigin-RevId: 788055227
1 parent afcef76 commit bdb32e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

centipede/dispatcher.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,12 @@ int DispatcherDoMutate(const FuzzTestDispatcherCallbacks& callbacks) {
333333
{
334334
TestCallbackGuard guard;
335335
fprintf(stderr, "calling custom mutator\n");
336+
// We ensure that:
337+
// * `inputs` is a valid pointer to an array of
338+
// `FuzzTestDispatcherInputForMutate` objects with length `num_inputs`.
339+
// * Each object of the array contains a valid `input` pointer to
340+
// `input_size` bytes, and a valid `metadata` pointer to `metadata_size`
341+
// bytes.
336342
callbacks.mutate(inputs.data(), inputs.size(), num_mutants,
337343
/*shrink=*/0);
338344
}
@@ -367,6 +373,7 @@ int DispatcherDoExecute(const FuzzTestDispatcherCallbacks& callbacks) {
367373
}
368374
{
369375
TestCallbackGuard guard;
376+
// We ensure that `input` is a valid pointer to an array of `size` bytes.
370377
callbacks.execute(data.data(), data.size());
371378
}
372379
if (!BatchResult::WriteInputEnd(*outputs_blobseq)) {

0 commit comments

Comments
 (0)