Compare commits
4 commits
master
...
afl-crash-
| Author | SHA1 | Date | |
|---|---|---|---|
| 22dcaafedf | |||
| 41a361739c | |||
| fd257fbd99 | |||
| 8e0fb9dac6 |
4 changed files with 80 additions and 0 deletions
9
Makefile
Normal file
9
Makefile
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
.PHONY: default
|
||||
default:
|
||||
$(MAKE) -C src
|
||||
$(MAKE) -C examples/tgunzip
|
||||
|
||||
.PHONY: %
|
||||
%:
|
||||
$(MAKE) -C src $@
|
||||
$(MAKE) -C examples/tgunzip $@
|
||||
30
examples/tgunzip/Makefile
Normal file
30
examples/tgunzip/Makefile
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
##
|
||||
## tgunzip - gzip decompressor example
|
||||
##
|
||||
## GCC makefile (Linux, FreeBSD, BeOS and QNX)
|
||||
##
|
||||
## Copyright (c) 2003 by Joergen Ibsen / Jibz
|
||||
## All Rights Reserved
|
||||
##
|
||||
## http://www.ibsensoftware.com/
|
||||
##
|
||||
|
||||
target = tgunzip
|
||||
objects = tgunzip.o
|
||||
libs = ../../lib/libtinf.a
|
||||
|
||||
cflags = -Wall -g -I../../src -fsanitize=undefined -fno-sanitize-recover=undefined
|
||||
ldflags = $(cflags) -Wl,-Map,ld.map
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(target)
|
||||
|
||||
$(target): $(objects) $(libs)
|
||||
/home/jepler/src/afl-2.52b/afl-clang-fast $(ldflags) -o $@ $^ $(libs)
|
||||
|
||||
%.o : %.c
|
||||
/home/jepler/src/afl-2.52b/afl-clang-fast $(cflags) -c $<
|
||||
|
||||
clean:
|
||||
$(RM) $(objects) $(target)
|
||||
|
|
@ -65,6 +65,10 @@ int main(int argc, char *argv[])
|
|||
|
||||
uzlib_init();
|
||||
|
||||
#ifdef __AFL_HAVE_MANUAL_CONTROL
|
||||
__AFL_INIT();
|
||||
#endif
|
||||
|
||||
/* -- open files -- */
|
||||
|
||||
if ((fin = fopen(argv[1], "rb")) == NULL) exit_error("source file");
|
||||
|
|
|
|||
37
src/Makefile
Normal file
37
src/Makefile
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
##
|
||||
## tinflib - tiny inflate library (inflate, gzip, zlib)
|
||||
##
|
||||
## GCC makefile (Linux, FreeBSD, BeOS and QNX)
|
||||
##
|
||||
## Copyright (c) 2003 by Joergen Ibsen / Jibz
|
||||
## All Rights Reserved
|
||||
##
|
||||
## http://www.ibsensoftware.com/
|
||||
##
|
||||
|
||||
target = ../lib/libtinf.a
|
||||
objects = tinflate.o tinfgzip.o tinfzlib.o adler32.o crc32.o \
|
||||
defl_static.o genlz77.o
|
||||
|
||||
headers = $(wildcard *.h)
|
||||
|
||||
cflags = -Wall -g -fsanitize=undefined -fno-sanitize-recover=undefined
|
||||
ldflags = $(cflags)
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
all: $(target)
|
||||
|
||||
$(target): $(objects)
|
||||
$(RM) $@
|
||||
ar -frsv $@ $^
|
||||
ranlib $@
|
||||
|
||||
%.o : %.c $(HEADERS)
|
||||
/home/jepler/src/afl-2.52b/afl-clang-fast $(cflags) -o $@ -c $<
|
||||
|
||||
%.o : %.nas
|
||||
nasm -o $@ -f elf -D_ELF_ -O3 -Inasm/ $<
|
||||
|
||||
clean:
|
||||
$(RM) $(objects) $(target)
|
||||
Loading…
Reference in a new issue