summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2017-05-23 22:43:52 +0800
committerMatt Johnston <matt@ucc.asn.au>2017-05-23 22:43:52 +0800
commit06e50d6f4fbfa2fdfb6ae89a0de1757a50918eb5 (patch)
tree4f0bd9042c46007a90d9d59371838495cfe0d972 /Makefile.in
parent06a4b2b0d49dc8f52f25462380ceccdbed26b601 (diff)
downloaddropbear-06e50d6f4fbfa2fdfb6ae89a0de1757a50918eb5.tar.gz
create fuzzer .options files
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile.in b/Makefile.in
index ea41916..94637ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -247,6 +247,8 @@ default_options.h: default_options.h.in
# list of fuzz targets
FUZZ_TARGETS=fuzzer-preauth fuzzer-pubkey
+FUZZER_OPTIONS = $(addsuffix .options, $(FUZZ_TARGETS))
+
list-fuzz-targets:
@echo $(FUZZ_TARGETS)
@@ -260,7 +262,7 @@ svrfuzzobjs=$(subst svr-main.o, ,$(dropbearobjs))
# build all the fuzzers. This will require fail to link unless built with
# make fuzzers LIBS=-lFuzzer.a
# or similar - the library provides main().
-fuzz-targets: $(FUZZ_TARGETS)
+fuzz-targets: $(FUZZ_TARGETS) $(FUZZER_OPTIONS)
fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs)
$(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@
@@ -268,6 +270,10 @@ fuzzer-preauth: fuzzer-preauth.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobj
fuzzer-pubkey: fuzzer-pubkey.o $(HEADERS) $(LIBTOM_DEPS) Makefile $(svrfuzzobjs)
$(CXX) $(CXXFLAGS) $@.o $(LDFLAGS) $(svrfuzzobjs) -o $@$(EXEEXT) $(LIBTOM_LIBS) $(LIBS) $(FUZZLIB) @CRYPTLIB@
+fuzzer-%.options: Makefile
+ echo "[libfuzzer]" > $@
+ echo "max_len = 50000" >> $@
+
# run this to update hardcoded hostkeys for for fuzzing.
# hostkeys.c is checked in to hg.
fuzz-hostkeys: