aboutsummaryrefslogtreecommitdiff
path: root/projects/dlplibs
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2017-04-04 22:55:53 +0200
committerAbhishek Arya <inferno@chromium.org>2017-04-04 13:55:53 -0700
commit41e114e0ced41495561614c82c595ec53cb57f90 (patch)
treee9888d29ede5ca5b98fe4c8851af77f157a5ddf9 /projects/dlplibs
parent361ceaece1dd8176d23f8ee47639f562ec60bbab (diff)
downloadoss-fuzz-41e114e0ced41495561614c82c595ec53cb57f90.tar.gz
add corpora for more formats (#511)
* add sdc corpus * add wps corpus * add Acta corpus * add bmi corpus * add lrf corpus
Diffstat (limited to 'projects/dlplibs')
-rw-r--r--projects/dlplibs/Dockerfile13
-rwxr-xr-xprojects/dlplibs/build.sh44
2 files changed, 54 insertions, 3 deletions
diff --git a/projects/dlplibs/Dockerfile b/projects/dlplibs/Dockerfile
index 197b8b329..24c63bc45 100644
--- a/projects/dlplibs/Dockerfile
+++ b/projects/dlplibs/Dockerfile
@@ -20,8 +20,8 @@ MAINTAINER dtardon@redhat.com
RUN apt-get update
RUN apt-get build-dep -y \
libmspub librevenge libcdr libvisio libpagemaker libfreehand libwpd \
- libwpg
-RUN apt-get install -y liblzma-dev libpng-dev wget
+ libwpg libwps libmwaw libe-book
+RUN apt-get install -y liblzma-dev libpng-dev wget liblangtag-dev
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 \
@@ -33,10 +33,15 @@ 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 \
https://dev-www.libreoffice.org/corpus/cmxfuzzer_seed_corpus.zip \
+ https://dev-www.libreoffice.org/corpus/sdcfuzzer_seed_corpus.zip \
+ https://dev-www.libreoffice.org/corpus/bmifuzzer_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 \
+ https://sourceforge.net/projects/libwps/files/corpus/wpsfuzzer_seed_corpus.zip \
+ https://sourceforge.net/projects/libmwaw/files/corpus/actafuzzer_seed_corpus.zip \
+ https://sourceforge.net/projects/libebook/files/corpus/lrffuzzer_seed_corpus.zip \
-P $SRC
# clone sources
RUN git clone --depth 1 git://git.code.sf.net/p/libwpd/librevenge
@@ -48,5 +53,9 @@ 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
+RUN git clone --depth 1 https://github.com/fosnola/libstaroffice
+RUN git clone --depth 1 git://git.code.sf.net/p/libwps/code libwps
+RUN git clone --depth 1 git://git.code.sf.net/p/libmwaw/libmwaw
+RUN git clone --depth 1 git://git.code.sf.net/p/libebook/code libe-book
WORKDIR $SRC
COPY build.sh $SRC/
diff --git a/projects/dlplibs/build.sh b/projects/dlplibs/build.sh
index d689bce82..2b81f125f 100755
--- a/projects/dlplibs/build.sh
+++ b/projects/dlplibs/build.sh
@@ -15,13 +15,17 @@
#
################################################################################
-# HACK to force linking with static icu and libxml2
+# HACK to force linking with static icu, libxml2 and liblangtag
+# WTH is liblangtag linked with glib?!
mkdir static
cp -pL \
/usr/lib/*/libicu*.a \
/usr/lib/*/libxml2.a \
/usr/lib/*/liblzma.a \
/usr/lib/*/libpng*.a \
+ /usr/lib/*/liblangtag.a \
+ /usr/lib/*/libglib-2.0.a \
+ /usr/lib/*/libpcre.a \
static
staticlib=$(pwd)/static
@@ -126,5 +130,43 @@ pushd libwpg
make -j$(nproc)
popd
+pushd libstaroffice
+./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)
+popd
+
+pushd libwps
+./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)
+popd
+
+pushd libmwaw
+./autogen.sh
+./configure --without-docs --disable-shared --enable-static --disable-tools --disable-zip --enable-fuzzers \
+ REVENGE_CFLAGS=-I$rvnginc REVENGE_LIBS="-L$rvnglib -lrevenge-0.0 -lrevenge-stream-0.0" \
+ REVENGE_GENERATORS_CFLAGS=-I$rvnginc REVENGE_GENERATORS_LIBS="-L$rvnglib -lrevenge-generators-0.0"
+make -j$(nproc)
+popd
+
+pushd libe-book
+./autogen.sh
+./configure --without-docs --disable-shared --enable-static --disable-tools --enable-fuzzers \
+ LDFLAGS=-L$staticlib \
+ XML_LIBS="-lxml2 -llzma" \
+ LANGTAG_LIBS="-llangtag -lglib-2.0 -lpcre" \
+ 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