You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Ensure exactly 2 4-byte numbers (numerator and denominator) are readif(size!=2*sizeof(uint32_t)){
return0;
}
To something like:
// Ensure exactly 2 4-byte numbers (numerator and denominator) are readif(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.
The text was updated successfully, but these errors were encountered:
We could improve the C/C++ example provided here.
We could turn the following code:
To something like:
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.The text was updated successfully, but these errors were encountered: