Skip to content

Instantly share code, notes, and snippets.

@samueleresca
Last active November 18, 2022 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueleresca/75db3e31839eef9913543691c85f77c9 to your computer and use it in GitHub Desktop.
Save samueleresca/75db3e31839eef9913543691c85f77c9 to your computer and use it in GitHub Desktop.
#include "examples/libfuzzer/libfuzzer_example.pb.h"
#include "port/protobuf.h"
#include "src/libfuzzer/libfuzzer_macro.h"
protobuf_mutator::protobuf::LogSilencer log_silincer;
// ...
// This is the fuzz target
DEFINE_BINARY_PROTO_FUZZER(const libfuzzer_example::Msg& message) {
// The fuzzed message is accessible from the target.
std::cerr << message.DebugString() << "\n";
abort();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment