aboutsummaryrefslogtreecommitdiff
path: root/projects/curl
diff options
context:
space:
mode:
authorMax Dymond <cmeister2@gmail.com>2017-10-02 15:47:55 +0100
committerAbhishek Arya <inferno@chromium.org>2017-10-02 07:47:55 -0700
commit069d366abe69be330be2830b6991a4277b0d65a3 (patch)
treedb6d422bf519602334f699596f6ec8574e2fa90f /projects/curl
parente2c6a3ec10496e036b6224b5ee7cc8ac55d7b562 (diff)
downloadoss-fuzz-069d366abe69be330be2830b6991a4277b0d65a3.tar.gz
Ensure curl and curl-fuzzer are extracted to src (#875)
Fixes #874
Diffstat (limited to 'projects/curl')
-rw-r--r--projects/curl/Dockerfile9
-rwxr-xr-xprojects/curl/build.sh30
-rw-r--r--projects/curl/curl_fuzzer.options3
-rw-r--r--projects/curl/http.dict41
4 files changed, 6 insertions, 77 deletions
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:"
-