Skip to content

Commit

Permalink
[curl] Move to using separated repository (#855)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cmeister2 authored and Dor1s committed Sep 25, 2017
1 parent ba52332 commit bf16050
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 3 additions & 2 deletions projects/curl/Dockerfile
Expand Up @@ -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/

15 changes: 12 additions & 3 deletions projects/curl/build.sh
Expand Up @@ -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/
Expand Down

0 comments on commit bf16050

Please sign in to comment.