-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
We could improve the C/C++ example provided here.
We could turn the following code:
// Ensure exactly 2 4-byte numbers (numerator and denominator) are read
if(size != 2 * sizeof(uint32_t)){
return 0;
}To something like:
// Ensure exactly 2 4-byte numbers (numerator and denominator) are read
if(size != 2 * sizeof(uint32_t)){
return -1; // Reject; The input will not be added to the corpus.
}As documented here. This makes the fuzzing harness more efficient, and documents the "reject input" feature of libFuzzer. We should then explain the return -1; and drop a link to the libFuzzer docs in the following paragraph.
Metadata
Metadata
Assignees
Labels
No labels