From 069d366abe69be330be2830b6991a4277b0d65a3 Mon Sep 17 00:00:00 2001 From: Max Dymond Date: Mon, 2 Oct 2017 15:47:55 +0100 Subject: [PATCH] Ensure curl and curl-fuzzer are extracted to src (#875) Fixes #874 --- projects/curl/Dockerfile | 9 +++---- projects/curl/build.sh | 30 ++-------------------- projects/curl/curl_fuzzer.options | 3 --- projects/curl/http.dict | 41 ------------------------------- 4 files changed, 6 insertions(+), 77 deletions(-) delete mode 100644 projects/curl/curl_fuzzer.options delete mode 100644 projects/curl/http.dict diff --git a/projects/curl/Dockerfile b/projects/curl/Dockerfile index 61ece2f32..5969a9f16 100644 --- a/projects/curl/Dockerfile +++ b/projects/curl/Dockerfile @@ -18,8 +18,7 @@ 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 /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/ - +RUN git clone --depth 1 https://github.com/curl/curl.git /src/curl +RUN git clone --depth 1 https://github.com/curl/curl-fuzzer.git /src/curl_fuzzer +WORKDIR /src/curl_fuzzer +COPY build.sh $SRC/ diff --git a/projects/curl/build.sh b/projects/curl/build.sh index d2d029f95..d5eb8db91 100755 --- a/projects/curl/build.sh +++ b/projects/curl/build.sh @@ -15,31 +15,5 @@ # ################################################################################ -echo "CC: $CC" -echo "CXX: $CXX" -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 --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. -./buildconf -./configure -make -make check -make zip - -cp -v curl_fuzzer curl_fuzzer_seed_corpus.zip $OUT/ - -# Copy dictionary and options file to $OUT. -cp $SRC/*.dict $SRC/*.options $OUT/ +# Run the OSS-Fuzz script in the curl-fuzzer project. +./ossfuzz.sh diff --git a/projects/curl/curl_fuzzer.options b/projects/curl/curl_fuzzer.options deleted file mode 100644 index 4c4530429..000000000 --- a/projects/curl/curl_fuzzer.options +++ /dev/null @@ -1,3 +0,0 @@ -[libfuzzer] -max_len = 10000 -dict = http.dict diff --git a/projects/curl/http.dict b/projects/curl/http.dict deleted file mode 100644 index 57b7b4372..000000000 --- a/projects/curl/http.dict +++ /dev/null @@ -1,41 +0,0 @@ -"\x0a\x0d" -"HTTP/1.0" -"HTTP/1.1" -"100" -"200" -"301" -"400" -"Server:" -"Last-Modified:" -"Content-Type:" -"text/html" -"charset=UTF-8" -"Accept-Ranges:" -"bytes" -"Content-Length:" -"Transfer-Encoding:" -"compress" -"exi" -"gzip" -"identity" -"pack200-gzip" -"br" -"deflate" -"bzip2" -"lzma" -"xz" -"Content-Encoding:" -"chunked" -"Connection:" -"close" -"Date:" -"Expires:" -"Fri, 31 Dec 1999 23:59:59 GMT" -"Cache-Control:" -"no-cache" -"no-store" -"must-revalidate" -"Pragma:" -"no-cache" -"Host:" -