class FuzzInput
Defined at line 18 of file ../../sdk/lib/fuzzing/cpp/fuzz_input.h
A C++ wrapper class for arbitrary input bytes supplied to a fuzzer.
API supports zero-copy and single-copy methods for extracting data, both of
which can fail.
Public Methods
const uint8_t * TakeBytes (size_t size)
Consumes exactly |size| bytes of underlying data without copying. Returns
a pointer to bytes on success or |nullptr| on failure.
Defined at line 14 of file ../../sdk/lib/fuzzing/cpp/fuzz_input.cc
void FuzzInput (const uint8_t * data, size_t remaining)
Defined at line 20 of file ../../sdk/lib/fuzzing/cpp/fuzz_input.h
bool CopyBytes (uint8_t * out, size_t size)
Copy exactly |size| bytes of underlying data into |out|. Returns |true| on
success or |false| on failure. In either case, client should assume that
data pointed to by |out| may have been modified.
Defined at line 24 of file ../../sdk/lib/fuzzing/cpp/fuzz_input.cc
template <typename T>
bool CopyObject (T * out)
Copies the next |sizeof(T)| bytes of underlying data into |out|. Returns
|true| on success or |false| on failure. In either case, client should
assume that data pointed to by |out| may have been modified.
Defined at line 30 of file ../../sdk/lib/fuzzing/cpp/fuzz_input.h