From d2b4ea016b1223c416d985b87d87b6ab94cd5795 Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Sun, 13 Aug 2017 03:11:03 +0200 Subject: [PATCH] fuzzer-standalone-loader.c: add comments --- src/openvpn/fuzzer-standalone-loader.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/openvpn/fuzzer-standalone-loader.c b/src/openvpn/fuzzer-standalone-loader.c index c7382878e..9c1c9a377 100644 --- a/src/openvpn/fuzzer-standalone-loader.c +++ b/src/openvpn/fuzzer-standalone-loader.c @@ -3,6 +3,20 @@ #include #include +/* This is a standalone program that loads every file specified + * as a command-line argument, and runs LLVMFuzzerTestOneInput + * on this data. This function is normally called by libFuzzer + * for every input it generates. This standalone program + * makes it possible to run just a specific input or inputs. + * + * This is necessary if you want to test your input files + * with MemorySantizer, because libFuzzer doesn't work well + * with MemorySanitizer. + * + * Code inspired by: + * https://github.com/openssl/openssl/blob/master/fuzz/test-corpus.c + */ + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); int LLVMFuzzerInitialize(int *argc, char ***argv); -- 2.47.2