test: stick to int in ares-fuzz.c

Using int rather than ares_ssize_t means this file
needs no c-ares dependency - it's a general driver for
any libFuzzer-style entrypoint.
pull/96/head
David Drysdale 8 years ago
parent 47d4f3f85b
commit ab6125b27c
  1. 3
      test/ares-fuzz.c

@ -9,7 +9,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include "ares.h"
#define kMaxAflInputSize (1 << 20) #define kMaxAflInputSize (1 << 20)
static unsigned char afl_buffer[kMaxAflInputSize]; static unsigned char afl_buffer[kMaxAflInputSize];
@ -26,7 +25,7 @@ static unsigned char afl_buffer[kMaxAflInputSize];
int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size); int LLVMFuzzerTestOneInput(const unsigned char *data, unsigned long size);
static void ProcessFile(int fd) { static void ProcessFile(int fd) {
ares_ssize_t count = read(fd, afl_buffer, kMaxAflInputSize); int count = read(fd, afl_buffer, kMaxAflInputSize);
/* /*
* Make a copy of the data so that it's not part of a larger * Make a copy of the data so that it's not part of a larger
* buffer (where buffer overflows would go unnoticed). * buffer (where buffer overflows would go unnoticed).

Loading…
Cancel
Save