mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-27 15:01:03 +08:00
Fix fuzzer
This commit is contained in:
parent
9680b8ccb3
commit
6cf3a3feaf
2
Makefile
2
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)
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user