add jbig support to the fuzzer

This commit is contained in:
Paul Kehrer 2018-10-29 11:36:13 +08:00
parent 7030e8acbc
commit 2d32b100aa

View File

@ -35,13 +35,21 @@ make -j$(nproc)
make install make install
popd popd
# Build libjbig
pushd "$SRC/jbigkit"
make lib
mv "$SRC"/jbigkit/libjbig/*.a "$WORK/lib/"
mv "$SRC"/jbigkit/libjbig/*.h "$WORK/include/"
popd
cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DBUILD_SHARED_LIBS=off cmake . -DCMAKE_INSTALL_PREFIX=$WORK -DBUILD_SHARED_LIBS=off
make -j$(nproc) make -j$(nproc)
make install make install
$CXX $CXXFLAGS -std=c++11 -I$WORK/include \ $CXX $CXXFLAGS -std=c++11 -I$WORK/include \
$SRC/libtiff/contrib/oss-fuzz/tiff_read_rgba_fuzzer.cc -o $OUT/tiff_read_rgba_fuzzer \ $SRC/libtiff/contrib/oss-fuzz/tiff_read_rgba_fuzzer.cc -o $OUT/tiff_read_rgba_fuzzer \
-lFuzzingEngine $WORK/lib/libtiffxx.a $WORK/lib/libtiff.a $WORK/lib/libz.a $WORK/lib/libjpeg.a -lFuzzingEngine $WORK/lib/libtiffxx.a $WORK/lib/libtiff.a $WORK/lib/libz.a $WORK/lib/libjpeg.a \
$WORK/lib/libjbig.a $WORK/lib/libjbig85.a
mkdir afl_testcases mkdir afl_testcases
(cd afl_testcases; tar xf "$SRC/afl_testcases.tgz") (cd afl_testcases; tar xf "$SRC/afl_testcases.tgz")