aboutsummaryrefslogtreecommitdiffhomepage
path: root/projects/c-ares/build.sh
diff options
context:
space:
mode:
authorGravatar inferno-chromium <inferno@chromium.org>2016-12-11 13:17:56 -0800
committerGravatar GitHub <noreply@github.com>2016-12-11 13:17:56 -0800
commit5f314f365e84ed68891d42dc8901074e6407b754 (patch)
tree840d92dca89d2b794e04657e01ad4f217ad2a790 /projects/c-ares/build.sh
parent46224562baaa4db7faa48dffbd19136a83bf5854 (diff)
Use c-ares fuzzer from its repo. (#167)
Diffstat (limited to 'projects/c-ares/build.sh')
-rwxr-xr-xprojects/c-ares/build.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/projects/c-ares/build.sh b/projects/c-ares/build.sh
index 8b3f1f69..b5f3d827 100755
--- a/projects/c-ares/build.sh
+++ b/projects/c-ares/build.sh
@@ -22,7 +22,11 @@ make clean
make -j$(nproc) V=1 all
# Build the fuzzer.
-$CXX $CXXFLAGS -std=c++11 -I. \
- $SRC/c_ares_ares_create_query_fuzzer.cc \
- -o $OUT/c_ares_ares_create_query_fuzzer \
+$CC $CFLAGS -I. -c $SRC/c-ares/test/ares-test-fuzz.c -o $WORK/ares-test-fuzz.o
+$CXX $CXXFLAGS -std=c++11 \
+ $WORK/ares-test-fuzz.o \
+ -o $OUT/ares_parse_reply_fuzzer \
-lFuzzingEngine $SRC/c-ares/.libs/libcares.a
+
+# Archive and copy to $OUT seed corpus if the build succeeded.
+zip -j $OUT/ares_parse_reply_fuzzer_seed_corpus.zip $SRC/c-ares/test/fuzzinput/*