From 88a6ce6b6ccbf459113fcca552e1fb6927156b13 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Tue, 16 Jan 2018 21:44:56 +0100 Subject: [PATCH] Move build script into the repo. --- Magick++/fuzz/build.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Magick++/fuzz/build.sh diff --git a/Magick++/fuzz/build.sh b/Magick++/fuzz/build.sh new file mode 100644 index 000000000..193e5e6a9 --- /dev/null +++ b/Magick++/fuzz/build.sh @@ -0,0 +1,23 @@ +#!/bin/bash -eu + +./configure --prefix="$WORK" --disable-shared --disable-docs +make "-j$(nproc)" +make install + +MAGICK_COMPILER=$CXX +MAGICK_COMPILER_FLAGS=$CXXFLAGS +MAGICK_INCLUDE="$WORK/include/ImageMagick-7" +MAGICK_SRC="$SRC/imagemagick/Magick++/fuzz" +MAGICK_LIBS="-lFuzzingEngine $WORK/lib/libMagick++-7.Q16HDRI.a $WORK/lib/libMagickWand-7.Q16HDRI.a $WORK/lib/libMagickCore-7.Q16HDRI.a" +MAGICK_OUTPUT=$OUT + +. $MAGICK_SRC/build_fuzzers.sh + +mkdir afl_testcases +(cd afl_testcases; tar xvf "$SRC/afl_testcases.tgz") +for format in gif jpg png bmp ico webp tif; do + mkdir $format + find afl_testcases -type f -name '*.'$format -exec mv -n {} $format/ \; + zip -rj $format.zip $format/ + cp $format.zip "$OUT/encoder_${format}_fuzzer_seed_corpus.zip" +done \ No newline at end of file -- 2.40.0