diff --git a/test/ares-fuzz.cc b/test/ares-fuzz.cc index 4680b727..936dd46e 100644 --- a/test/ares-fuzz.cc +++ b/test/ares-fuzz.cc @@ -5,8 +5,8 @@ #include -extern "C" void LLVMFuzzerTestOneInput(const unsigned char *data, - unsigned long size); +extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, + unsigned long size); int main() { std::vector input; while (true) { diff --git a/test/ares-test-fuzz.cc b/test/ares-test-fuzz.cc index 49d844c5..657a0a1b 100644 --- a/test/ares-test-fuzz.cc +++ b/test/ares-test-fuzz.cc @@ -2,8 +2,8 @@ #include // Entrypoint for Clang's libfuzzer -extern "C" void LLVMFuzzerTestOneInput(const unsigned char *data, - unsigned long size) { +extern "C" int LLVMFuzzerTestOneInput(const unsigned char *data, + unsigned long size) { // Feed the data into each of the ares_parse_*_reply functions. struct hostent *host = nullptr; struct ares_addrttl info[5]; @@ -41,4 +41,5 @@ extern "C" void LLVMFuzzerTestOneInput(const unsigned char *data, struct ares_soa_reply* soa = nullptr; ares_parse_soa_reply(data, size, &soa); if (soa) ares_free_data(soa); + return 0; }