test: Update fuzzing function prototype

libFuzzer changed expected return type from void to int
in LLVM 3.8.
pull/51/head
David Drysdale 9 years ago
parent d311c47920
commit 5bbb7538bb
  1. 4
      test/ares-fuzz.cc
  2. 5
      test/ares-test-fuzz.cc

@ -5,8 +5,8 @@
#include <vector>
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<unsigned char> input;
while (true) {

@ -2,8 +2,8 @@
#include <vector>
// 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;
}

Loading…
Cancel
Save