curl-fuzzer C++ reference
Loading...
Searching...
No Matches
fuzzer_main.h
Go to the documentation of this file.
1/*
2 * Copyright (C) Max Dymond, <cmeister2@gmail.com>, et al.
3 *
4 * SPDX-License-Identifier: curl
5 */
6
9
10#ifndef PROTO_FUZZER_FUZZER_MAIN_H_
11#define PROTO_FUZZER_FUZZER_MAIN_H_
12
13#include <cstddef>
14#include <cstdint>
15
17
18namespace proto_fuzzer {
19
20int ProtoFuzzerTestOneInput(const std::uint8_t* data, std::size_t size, const ProfileFuzzerTraits& traits);
21
22std::size_t ProtoFuzzerCustomMutator(std::uint8_t* data, std::size_t size, std::size_t max_size, unsigned int seed,
23 const ProfileFuzzerTraits& traits);
24
25std::size_t ProtoFuzzerCustomCrossOver(const std::uint8_t* data1, std::size_t size1, const std::uint8_t* data2,
26 std::size_t size2, std::uint8_t* out, std::size_t max_out_size,
27 unsigned int seed, const ProfileFuzzerTraits& traits);
28
29} // namespace proto_fuzzer
30
31#endif // PROTO_FUZZER_FUZZER_MAIN_H_
std::size_t ProtoFuzzerCustomMutator(std::uint8_t *data, std::size_t size, std::size_t max_size, unsigned int seed, const ProfileFuzzerTraits &traits)
Mutate one serialized generated profile message.
int ProtoFuzzerTestOneInput(const std::uint8_t *data, std::size_t size, const ProfileFuzzerTraits &traits)
Load and execute one generated-profile input under its fixed target lane.
std::size_t ProtoFuzzerCustomCrossOver(const std::uint8_t *data1, std::size_t size1, const std::uint8_t *data2, std::size_t size2, std::uint8_t *out, std::size_t max_out_size, unsigned int seed, const ProfileFuzzerTraits &traits)
Cross two serialized generated profile messages of the same concrete type.
Type-safe libprotobuf-mutator hooks for one generated target profile.
Ordinary runtime binding for one generated protobuf profile.