Here are some extremely simple setups for using libfuzzer and libprotobuf-mutator with CMake. Created because all the examples I could find were too darn complicated for my limited CMake experience...
These generally require the latest version of LLVM (clang, lld, etc.) to build. I recommend building it from source. You'll also want to install libprotobuf-mutator.
I build up from the basics:
fuzz
: basic example from libfuzzer's documentationfuzz-library
: connecting to a C libraryfuzz-proto
: adding protobufsfuzz-proto-mutator
: use libprotobuf-mutator to mutate protobufsfuzz-library-proto-mutator
: use libprotobuf-mutator to mutate protobufs, for fuzzing a C library
This project is licensed under the MIT License - see the LICENSE file for details