summaryrefslogtreecommitdiffstats
path: root/fuzz/init-fuzzers.sh
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2017-05-29 04:08:29 +0200
committerGravatar Nikias Bassen2017-05-29 04:08:29 +0200
commit99f3ab144dcaa97a2be37e562740dbff2de350c6 (patch)
treeb6540c04944d1e493e95693c70b2d39e8b01302b /fuzz/init-fuzzers.sh
parent1e89644636438269bcedb50f3eabf0780d0074ac (diff)
downloadlibplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.gz
libplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.bz2
Integrate fuzzers into build system
Diffstat (limited to 'fuzz/init-fuzzers.sh')
-rwxr-xr-xfuzz/init-fuzzers.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/fuzz/init-fuzzers.sh b/fuzz/init-fuzzers.sh
new file mode 100755
index 0000000..e48baa8
--- /dev/null
+++ b/fuzz/init-fuzzers.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+
+CURDIR=`pwd`
+FUZZDIR=`dirname $0`
+
+cd ${FUZZDIR}
+
+if ! test -x xplist_fuzzer || ! test -x bplist_fuzzer; then
+ echo "ERROR: you need to build the fuzzers first."
+ cd ${CURDIR}
+ exit 1
+fi
+
+mkdir -p xplist-input
+cp ../test/data/*.plist xplist-input/
+./xplist_fuzzer -merge=1 xplist-input crashes leaks -dict=xplist.dict
+
+mkdir -p bplist-input
+cp ../test/data/*.bplist bplist-input/
+./bplist_fuzzer -merge=1 bplist-input crashes leaks -dict=bplist.dict
+
+cd ${CURDIR}
+exit 0