test/fuzz: add some applications, add an experimental multi-packet mode

The experimental multi-packet mode splits input bytes depending on a length
decoded from the first 2 bytes and does that until the end of input.
To use this mode, compile with "make D=-DLWIP_FUZZ_MULTI_PACKET"

Signed-off-by: goldsimon <goldsimon@gmx.de>
This commit is contained in:
goldsimon
2018-02-15 14:35:08 +01:00
parent cd1516e2e4
commit 58de2af5f2
4 changed files with 76 additions and 9 deletions

View File

@@ -34,13 +34,14 @@ all compile: lwip_fuzz
CC=afl-gcc
LDFLAGS=-lm
CFLAGS=-O0
# use 'make D=-DUSER_DEFINE' to pass a user define to gcc
CFLAGS=-O0 $(D)
CONTRIBDIR=../../../lwip-contrib
include $(CONTRIBDIR)/ports/unix/Common.mk
clean:
rm -f *.o $(LWIPLIBCOMMON) lwip_fuzz *.s .depend* *.core core
rm -f *.o $(LWIPLIBCOMMON) $(APPLIB) lwip_fuzz *.s .depend* *.core core
depend dep: .depend
@@ -49,5 +50,5 @@ include .depend
.depend: fuzz.c $(LWIPFILES) $(APPFILES)
$(CCDEP) $(CFLAGS) -MM $^ > .depend || rm -f .depend
lwip_fuzz: .depend $(LWIPLIBCOMMON) fuzz.o
$(CC) $(CFLAGS) -o lwip_fuzz fuzz.o $(LWIPLIBCOMMON) $(LDFLAGS)
lwip_fuzz: .depend $(LWIPLIBCOMMON) $(APPLIB) fuzz.o
$(CC) $(CFLAGS) -o lwip_fuzz fuzz.o $(APPLIB) $(LWIPLIBCOMMON) $(LDFLAGS)