mirror of https://github.com/google/oss-fuzz.git
Build lcms2 for poppler (#3528)
There's quite some code hidden behind #ifdef USE_CMS so better to fuzz that code too
This commit is contained in:
parent
3c28d2a860
commit
77ef89c1da
|
@ -19,6 +19,7 @@ MAINTAINER jonathan@titanous.com
|
|||
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config cmake
|
||||
RUN git clone --depth 1 https://anongit.freedesktop.org/git/poppler/poppler.git
|
||||
RUN git clone --depth 1 git://git.sv.nongnu.org/freetype/freetype2.git
|
||||
RUN git clone --depth 1 https://github.com/mm2/Little-CMS.git
|
||||
RUN git clone --depth 1 https://github.com/mozilla/pdf.js pdf.js && \
|
||||
zip -q $SRC/pdf_fuzzer_seed_corpus.zip pdf.js/test/pdfs/*.pdf && \
|
||||
rm -rf pdf.js
|
||||
|
|
|
@ -21,6 +21,11 @@ pushd $SRC/freetype2
|
|||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
pushd $SRC/Little-CMS
|
||||
./configure --prefix="$WORK" --disable-shared PKG_CONFIG_PATH="$WORK/lib/pkgconfig"
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
mkdir -p $WORK/poppler
|
||||
pushd $WORK/poppler
|
||||
cmake $SRC/poppler \
|
||||
|
@ -29,7 +34,6 @@ cmake $SRC/poppler \
|
|||
-DFONT_CONFIGURATION=generic \
|
||||
-DENABLE_DCTDECODER=none \
|
||||
-DENABLE_LIBOPENJPEG=none \
|
||||
-DENABLE_CMS=none \
|
||||
-DENABLE_LIBPNG=OFF \
|
||||
-DENABLE_ZLIB=OFF \
|
||||
-DENABLE_LIBTIFF=OFF \
|
||||
|
@ -40,15 +44,14 @@ cmake $SRC/poppler \
|
|||
-DENABLE_UTILS=OFF \
|
||||
-DWITH_Cairo=OFF \
|
||||
-DWITH_NSS3=OFF \
|
||||
-DFREETYPE_INCLUDE_DIRS=$WORK/include/freetype2 \
|
||||
-DFREETYPE_LIBRARY=$WORK/lib
|
||||
-DCMAKE_INSTALL_PREFIX=$WORK
|
||||
make -j$(nproc) poppler poppler-cpp
|
||||
|
||||
fuzz_target=pdf_fuzzer
|
||||
|
||||
$CXX $CXXFLAGS -std=c++11 -I$SRC/poppler/cpp \
|
||||
$SRC/fuzz/pdf_fuzzer.cc -o $OUT/$fuzz_target \
|
||||
$LIB_FUZZING_ENGINE $WORK/poppler/cpp/libpoppler-cpp.a $WORK/poppler/libpoppler.a $WORK/lib/libfreetype.a
|
||||
$LIB_FUZZING_ENGINE $WORK/poppler/cpp/libpoppler-cpp.a $WORK/poppler/libpoppler.a $WORK/lib/libfreetype.a $WORK/lib/libfreetype.a $WORK/lib/liblcms2.a
|
||||
|
||||
mv $SRC/{*.zip,*.dict} $OUT
|
||||
|
||||
|
|
Loading…
Reference in New Issue