#include "src/libfuzzer/libfuzzer_mutator.h"
#include <string.h>
#include <algorithm>
#include <cassert>
#include <memory>
#include <string>
#include "port/protobuf.h"
#include "src/mutator.h"
#ifdef _MSC_VER
#if defined(_M_IX86) || defined(__i386__)
#define WIN_SYM_PREFIX …
#else
#define WIN_SYM_PREFIX
#endif
#define STRINGIFY_ …
#define STRINGIFY …
#define WEAK_DEFAULT_NAME …
#define LIB_PROTO_MUTATOR_WEAK_DEF …
#else
#define LIB_PROTO_MUTATOR_WEAK_DEF(ReturnType, Name, ...) …
#endif
LIB_PROTO_MUTATOR_WEAK_DEF(size_t, LLVMFuzzerMutate, uint8_t*, size_t, size_t) { … }
namespace protobuf_mutator {
namespace libfuzzer {
namespace {
template <class T>
T MutateValue(T v) { … }
}
int32_t Mutator::MutateInt32(int32_t value) { … }
int64_t Mutator::MutateInt64(int64_t value) { … }
uint32_t Mutator::MutateUInt32(uint32_t value) { … }
uint64_t Mutator::MutateUInt64(uint64_t value) { … }
float Mutator::MutateFloat(float value) { … }
double Mutator::MutateDouble(double value) { … }
std::string Mutator::MutateString(const std::string& value,
int size_increase_hint) { … }
}
}