class Input
Defined at line 25 of file ../../src/sys/fuzzing/common/input.h
Represents a single fuzzing input. A corpus is a collection of fuzzing inputs. Inputs are either
provided as part of a seed corpus, or generated by mutating existing inputs.
Public Methods
void Input (SharedMemory & shmem)
Defined at line 21 of file ../../src/sys/fuzzing/common/input.cc
void Input ()
Defined at line 27 of file ../../src/sys/fuzzing/common/input.h
void Input (const std::initializer_list<uint8_t> & bytes)
Defined at line 28 of file ../../src/sys/fuzzing/common/input.h
void Input (const std::vector<uint8_t> & bytes)
Defined at line 29 of file ../../src/sys/fuzzing/common/input.h
void Input (const std::string & bytes)
Defined at line 30 of file ../../src/sys/fuzzing/common/input.h
void Input (size_t size)
Defined at line 32 of file ../../src/sys/fuzzing/common/input.h
void Input (Input && other)
Defined at line 33 of file ../../src/sys/fuzzing/common/input.h
void ~Input ()
Defined at line 35 of file ../../src/sys/fuzzing/common/input.h
bool operator== (const Input & other)
Defined at line 38 of file ../../src/sys/fuzzing/common/input.h
bool operator!= (const Input & other)
Defined at line 39 of file ../../src/sys/fuzzing/common/input.h
bool operator< (const Input & other)
Defined at line 40 of file ../../src/sys/fuzzing/common/input.h
bool operator> (const Input & other)
Defined at line 41 of file ../../src/sys/fuzzing/common/input.h
bool operator<= (const Input & other)
Defined at line 42 of file ../../src/sys/fuzzing/common/input.h
bool operator>= (const Input & other)
Defined at line 43 of file ../../src/sys/fuzzing/common/input.h
Input & operator= (Input && other)
Defined at line 43 of file ../../src/sys/fuzzing/common/input.cc
const uint8_t * data ()
Defined at line 50 of file ../../src/sys/fuzzing/common/input.h
uint8_t * data ()
Defined at line 51 of file ../../src/sys/fuzzing/common/input.h
size_t size ()
Defined at line 52 of file ../../src/sys/fuzzing/common/input.h
size_t capacity ()
Defined at line 53 of file ../../src/sys/fuzzing/common/input.h
size_t num_features ()
Defined at line 54 of file ../../src/sys/fuzzing/common/input.h
void set_num_features (size_t num_features)
Defined at line 56 of file ../../src/sys/fuzzing/common/input.h
std::string ToHex (bool truncate)
Returns a hex string representation. If the input is more than 6 bytes and |truncate|d, the
returned string will be the first few bytes, followed by "...".
Defined at line 78 of file ../../src/sys/fuzzing/common/input.cc
void Swap (Input & other)
Exchanges the internal state of this input with another.
Defined at line 92 of file ../../src/sys/fuzzing/common/input.cc
Input Duplicate ()
Creates a copy of this input.
Defined at line 99 of file ../../src/sys/fuzzing/common/input.cc
void Duplicate (const Input & other)
Makes this object a copy of the |other|.
Defined at line 106 of file ../../src/sys/fuzzing/common/input.cc
void Reserve (size_t capacity)
Ensures the input has at least the given |capacity|.
Defined at line 111 of file ../../src/sys/fuzzing/common/input.cc
void Write (const void * data, size_t size)
Appends data to this input. The input must have sufficient remaining capacity for |size| bytes.
Defined at line 118 of file ../../src/sys/fuzzing/common/input.cc
void Write (uint8_t one_byte)
Defined at line 124 of file ../../src/sys/fuzzing/common/input.cc
size_t Resize (size_t size)
Reserves capacity and sets the size of this input to |size| bytes. This method does NOT
initialize the data, but can be used in conjunction with the |data()| accessor to write into
the input. Returns the new size.
Defined at line 129 of file ../../src/sys/fuzzing/common/input.cc
size_t Truncate (size_t max_size)
Truncates the input if larger than |max_size|. Returns the new size.
Defined at line 135 of file ../../src/sys/fuzzing/common/input.cc
size_t ShrinkToFit ()
Reduces the capacity of this input to its size. Returns the new size.
Defined at line 140 of file ../../src/sys/fuzzing/common/input.cc
void Clear ()
Removes all data from this input.
Defined at line 148 of file ../../src/sys/fuzzing/common/input.cc
Friends
std::ostream & Input (std::ostream & osconst Input & input)