add wpd+wpg corpora (#509)

* add wpd corpus

* add wpg corpus
This commit is contained in:
David Tardon 2017-04-04 19:05:20 +02:00 committed by Abhishek Arya
parent 9bf074e1fd
commit 6c5d061338
2 changed files with 30 additions and 2 deletions

View File

@ -19,8 +19,9 @@ MAINTAINER dtardon@redhat.com
# install build requirements
RUN apt-get update
RUN apt-get build-dep -y \
libmspub librevenge libcdr libvisio libpagemaker libfreehand
RUN apt-get install -y liblzma-dev libpng-dev
libmspub librevenge libcdr libvisio libpagemaker libfreehand libwpd \
libwpg
RUN apt-get install -y liblzma-dev libpng-dev wget
ADD https://dev-www.libreoffice.org/src/lcms2-2.8.tar.gz $SRC/
# download fuzzing corpora
ADD https://dev-www.libreoffice.org/corpus/olefuzzer_seed_corpus.zip \
@ -32,6 +33,10 @@ ADD https://dev-www.libreoffice.org/corpus/olefuzzer_seed_corpus.zip \
https://dev-www.libreoffice.org/corpus/pmdfuzzer_seed_corpus.zip \
https://dev-www.libreoffice.org/corpus/fhfuzzer_seed_corpus.zip \
$SRC/
RUN wget \
https://sourceforge.net/projects/libwpd/files/corpus/wpdfuzzer_seed_corpus.zip \
https://sourceforge.net/projects/libwpg/files/corpus/wpgfuzzer_seed_corpus.zip \
-P $SRC
# clone sources
RUN git clone --depth 1 git://git.code.sf.net/p/libwpd/librevenge
RUN git clone --depth 1 git://gerrit.libreoffice.org/libmspub
@ -40,5 +45,7 @@ RUN git clone --depth 1 git://gerrit.libreoffice.org/libvisio
RUN git clone --depth 1 git://gerrit.libreoffice.org/libzmf
RUN git clone --depth 1 git://gerrit.libreoffice.org/libpagemaker
RUN git clone --depth 1 git://gerrit.libreoffice.org/libfreehand
RUN git clone --depth 1 git://git.code.sf.net/p/libwpd/code libwpd
RUN git clone --depth 1 git://git.code.sf.net/p/libwpg/code libwpg
WORKDIR $SRC
COPY build.sh $SRC/

View File

@ -105,5 +105,26 @@ pushd libfreehand
make -j$(nproc)
popd
pushd libwpd
./autogen.sh
./configure --without-docs --disable-shared --enable-static --disable-tools --enable-fuzzers \
REVENGE_CFLAGS=-I$rvnginc REVENGE_LIBS="-L$rvnglib -lrevenge-0.0" \
REVENGE_STREAM_CFLAGS=-I$rvnginc REVENGE_STREAM_LIBS="-L$rvnglib -lrevenge-stream-0.0" \
REVENGE_GENERATORS_CFLAGS=-I$rvnginc REVENGE_GENERATORS_LIBS="-L$rvnglib -lrevenge-generators-0.0"
make -j$(nproc)
wpdinc=$(pwd)/inc
wpdlib=$(pwd)/src/lib
popd
pushd libwpg
./autogen.sh
./configure --without-docs --disable-shared --enable-static --disable-tools --enable-fuzzers \
WPD_CFLAGS=-I$wpdinc WPD_LIBS="-L$wpdlib -lwpd-0.10" \
REVENGE_CFLAGS=-I$rvnginc REVENGE_LIBS="-L$rvnglib -lrevenge-0.0" \
REVENGE_STREAM_CFLAGS=-I$rvnginc REVENGE_STREAM_LIBS="-L$rvnglib -lrevenge-stream-0.0" \
REVENGE_GENERATORS_CFLAGS=-I$rvnginc REVENGE_GENERATORS_LIBS="-L$rvnglib -lrevenge-generators-0.0"
make -j$(nproc)
popd
cp */src/fuzz/*fuzzer $OUT
cp *_seed_corpus.zip $OUT