From bf16050624e88ae1c2428a9a1cdfc13adf306b43 Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Mon, 25 Sep 2017 15:51:07 +0100 Subject: [PATCH] [curl] Move to using separated repository (#855) The curl fuzzer has been moved into its own repository, http://github.com/curl/curl-fuzzer. For oss-fuzz this means it needs to check out two codebases and compile them. --- projects/curl/Dockerfile | 5 +++-- projects/curl/build.sh | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/curl/Dockerfile b/projects/curl/Dockerfile index 1afe523bc14..61ece2f320e 100644 --- a/projects/curl/Dockerfile +++ b/projects/curl/Dockerfile @@ -18,7 +18,8 @@ FROM gcr.io/oss-fuzz-base/base-builder MAINTAINER dvyukov@google.com RUN apt-get update && apt-get install -y make autoconf automake libtool libssl-dev zlib1g-dev -RUN git clone --depth 1 https://github.com/curl/curl.git -WORKDIR curl +RUN git clone --depth 1 https://github.com/curl/curl.git /tmp/curl +RUN git clone --depth 1 https://github.com/curl/curl-fuzzer.git /tmp/curl_fuzzer +WORKDIR /tmp/curl_fuzzer COPY build.sh *.options *.dict $SRC/ diff --git a/projects/curl/build.sh b/projects/curl/build.sh index 1b761b29e5a..d2d029f9538 100755 --- a/projects/curl/build.sh +++ b/projects/curl/build.sh @@ -21,13 +21,22 @@ echo "LIB_FUZZING_ENGINE: $LIB_FUZZING_ENGINE" echo "CFLAGS: $CFLAGS" echo "CXXFLAGS: $CXXFLAGS" +# Make an install directory +export INSTALLDIR=/tmp/curl_install + +# Compile curl +pushd /tmp/curl ./buildconf -./configure --disable-shared --enable-debug --enable-maintainer-mode --disable-symbol-hiding --disable-threaded-resolver --enable-ipv6 --with-random=/dev/null --without-ssl +./configure --prefix=${INSTALLDIR} --disable-shared --enable-debug --enable-maintainer-mode --disable-symbol-hiding --disable-threaded-resolver --enable-ipv6 --with-random=/dev/null --without-ssl make -j$(nproc) +make install +popd # Build the fuzzer. -cd tests/fuzz -make all +./buildconf +./configure +make +make check make zip cp -v curl_fuzzer curl_fuzzer_seed_corpus.zip $OUT/