@@ -42,6 +42,7 @@ espeak_callback(short *data, int samples, espeak_EVENT *events) | |||
/* See http://llvm.org/docs/LibFuzzer.html */ | |||
extern int LLVMFuzzerRunDriver(int *argc, char ***argv, | |||
int (*UserCb)(const uint8_t *Data, size_t Size)); | |||
extern int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); | |||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) | |||
{ |
@@ -27,7 +27,7 @@ | |||
#include <espeak-ng/espeak_ng.h> | |||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); | |||
extern int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); | |||
int main(int argc, char **argv) { | |||
int i; |
@@ -42,14 +42,13 @@ extern int LLVMFuzzerInitialize(const int* argc, char*** argv); | |||
char *filepath = NULL; | |||
extern int LLVMFuzzerInitialize(const int* argc, char*** argv) | |||
{ | |||
int LLVMFuzzerInitialize(const int* argc, char*** argv) { | |||
(void)argc; // unused | |||
filepath = dirname(strdup((*argv)[0])); | |||
return 0; | |||
} | |||
extern int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | |||
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { | |||
if (!initialized) { | |||
const char *hasDataPath = getenv("ESPEAK_DATA_PATH"); | |||
if (!hasDataPath) { |