Hi, As a result of #739, I wrote a fuzzing harness so people can fuzz the library themselves if they want so.
This is my first time playing with libFuzzer so any feedback/criticism is very welcome.
For the autotools part it’s mostly copied from bitcoin core with the caveat of automatically adding -fsanitize=fuzzer,
because this is only libFuzzer so and that’s required to run it anyway.
Currently it’s fuzzing only the public API of the library, but in the future we can add fuzzing for internal functions, which is why I created a fuzz
directory.
One thing I did that I know isn’t quite standard is the Fuzz Garbage through parsing functions
part, where I loop over the input byte by byte and feed it into the parsing functions, I think this is a good way to throw a lot of data into these functions and make sure that: A. they don’t crash, B. they return only 1 or 0.