diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2021-03-25 15:10:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-25 14:10:39 +0000 |
commit | 919a35ae1f5d1715f8702d973f24fd44c843f7af (patch) | |
tree | 2bbd1c30e9ddd89224c5a8442cdad31fa7a66c71 | |
parent | 2e183b053c59f5fa4c30422d6e8e38de9f3a37d2 (diff) | |
download | oss-fuzz-919a35ae1f5d1715f8702d973f24fd44c843f7af.tar.gz |
[ghostscript] Copy fuzzer glue code to dir outside of git repo (#5501)
This makes it easier to build the fuzzer using a locally checked
out git repo without having to manually copy the fuzzer glue code
into the locally checked out git repo first.
-rw-r--r-- | projects/ghostscript/Dockerfile | 5 | ||||
-rwxr-xr-x | projects/ghostscript/build.sh | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/projects/ghostscript/Dockerfile b/projects/ghostscript/Dockerfile index 942d8c347..c21bb87d3 100644 --- a/projects/ghostscript/Dockerfile +++ b/projects/ghostscript/Dockerfile @@ -20,8 +20,9 @@ RUN apt-get update && apt-get install -y autoconf zlibc libtool liblcms2-dev lib RUN git clone --branch branch-2.2 --single-branch --depth 1 https://github.com/apple/cups.git cups RUN git clone --branch VER-2-10-1 --single-branch --depth 1 https://git.savannah.gnu.org/git/freetype/freetype2.git freetype RUN git clone --single-branch --depth 1 git://git.ghostscript.com/ghostpdl.git ghostpdl - RUN mkdir ghostpdl/fuzz -COPY gstoraster_fuzzer.cc ghostpdl/fuzz +WORKDIR ghostpdl + +COPY gstoraster_fuzzer.cc $SRC/ COPY build.sh $SRC/ diff --git a/projects/ghostscript/build.sh b/projects/ghostscript/build.sh index 07ae5ee70..b74772f13 100755 --- a/projects/ghostscript/build.sh +++ b/projects/ghostscript/build.sh @@ -16,7 +16,7 @@ ################################################################################ # Build CUPS -pushd cups +pushd $SRC/cups # Fix bad line sed -i '2110s/\(\s\)f->value/\1(int)f->value/' cups/ppd-cache.c @@ -29,13 +29,12 @@ make -C filter libs install-libs install -m755 cups-config "$WORK"/cups-config popd -cd ghostpdl rm -rf cups/libs || die rm -rf freetype || die rm -rf libpng || die rm -rf zlib || die -mv ../freetype freetype +mv $SRC/freetype freetype CUPSCONFIG="$WORK/cups-config" CUPS_CFLAGS=$($CUPSCONFIG --cflags) @@ -51,7 +50,7 @@ CPPFLAGS="${CPPFLAGS:-} $CUPS_CFLAGS -DPACIFY_VALGRIND" ./autogen.sh \ make -j$(nproc) libgs $CXX $CXXFLAGS $CUPS_LDFLAGS -std=c++11 -I. \ - fuzz/gstoraster_fuzzer.cc \ + $SRC/gstoraster_fuzzer.cc \ -o "$OUT/gstoraster_fuzzer" \ -Wl,-rpath='$ORIGIN' \ $CUPS_LIBS \ |