diff --git a/Makefile b/Makefile index 67037e88..91e272e1 100644 --- a/Makefile +++ b/Makefile @@ -82,7 +82,7 @@ fuzz: mongoose.c mongoose.h Makefile test/fuzz.c $(RUN) ./fuzzer fuzz2: mongoose.c mongoose.h Makefile test/fuzz.c - $(CC) test/fuzz.c test/packed_fs.c -DMAIN $(CFLAGS) -o fuzzer + $(CC) test/fuzz.c -DMAIN $(OPTS) $(WARN) $(ASAN) $(INCS) -o fuzzer $(RUN) ./fuzzer /tmp/fuzzdata test: Makefile mongoose.h $(SRCS) diff --git a/test/fuzz.c b/test/fuzz.c index 212c413d..6974284e 100644 --- a/test/fuzz.c +++ b/test/fuzz.c @@ -58,7 +58,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { mg_json_get(mg_str_n((char *) data, size), "$[0]", &n); if (size > 0) { - struct mip_cfg cfg = {0}; + struct mip_cfg cfg = {{0,0,0,0,0,0}, 0x01020304, 255, 0x01010101}; size_t pktlen = 1540; char t[sizeof(struct mip_if) + pktlen * 2 + 0 /* qlen */]; struct mip_if *ifp = (struct mip_if *) t;