diff options
author | 2017-05-29 17:34:31 +0200 | |
---|---|---|
committer | 2017-05-29 08:34:31 -0700 | |
commit | 3d1773b3d470e711f13e03e13a37c8e2269af1a6 (patch) | |
tree | d343a2b69c4c03771d13382f79c1195e8d4e27f3 /projects/wget2 | |
parent | 9eab6b64696783430b6373aaf9d9d8c4fcf405e0 (diff) |
Add GNU wget2 to oss-fuzz (#630)
Diffstat (limited to 'projects/wget2')
-rw-r--r-- | projects/wget2/Dockerfile | 42 | ||||
-rwxr-xr-x | projects/wget2/build.sh | 43 | ||||
-rw-r--r-- | projects/wget2/project.yaml | 4 |
3 files changed, 89 insertions, 0 deletions
diff --git a/projects/wget2/Dockerfile b/projects/wget2/Dockerfile new file mode 100644 index 00000000..518fc698 --- /dev/null +++ b/projects/wget2/Dockerfile @@ -0,0 +1,42 @@ +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +FROM gcr.io/oss-fuzz-base/base-builder +MAINTAINER rockdaboot@gmail.com +RUN apt-get update && apt-get install -y \ + pkg-config \ + gettext \ + autopoint \ + autoconf \ + automake \ + libtool \ + texinfo \ + flex \ + liblzma-dev \ + libidn2-0-dev \ + libunistring-dev \ + zlib1g-dev \ + libbz2-dev \ + gnutls-dev \ + libpsl-dev \ + libnghttp2-dev \ + doxygen + +RUN git clone --depth=1 https://gitlab.com/gnuwget/wget2.git +RUN cd wget2 && git submodule update --init + +WORKDIR wget2 +COPY build.sh $SRC/ diff --git a/projects/wget2/build.sh b/projects/wget2/build.sh new file mode 100755 index 00000000..88749d72 --- /dev/null +++ b/projects/wget2/build.sh @@ -0,0 +1,43 @@ +#!/bin/bash -eu +# Copyright 2016 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +################################################################################ + +./bootstrap +./configure --enable-static --disable-doc +make + +cp -p fuzz/*.dict fuzz/*.options $OUT + +fuzzers=$(find fuzz/ -name "*_fuzzer.cc") + +for f in $fuzzers; do + fuzzer=$(basename "$f" ".cc") + + $CXX $CXXFLAGS -std=c++11 -Iinclude/wget/ \ + "fuzz/${fuzzer}.cc" -o "$OUT/${fuzzer}" \ + libwget/.libs/libwget.a -lFuzzingEngine -Wl,-Bstatic \ + -lidn2 -lunistring \ + -Wl,-Bdynamic + + if [ -f "$SRC/${fuzzer}_seed_corpus.zip" ]; then + cp "$SRC/${fuzzer}_seed_corpus.zip" "$OUT/" + fi + + corpus_dir=$(basename "${fuzzer}" "_fuzzer") + if [ -d "fuzz/${corpus_dir}.in/" ]; then + zip -r "$OUT/${fuzzer}_seed_corpus.zip" "fuzz/${corpus_dir}.in/" + fi +done diff --git a/projects/wget2/project.yaml b/projects/wget2/project.yaml new file mode 100644 index 00000000..99ca0648 --- /dev/null +++ b/projects/wget2/project.yaml @@ -0,0 +1,4 @@ +homepage: "https://gitlab.com/gnuwget/wget2" +primary_contact: "rockdaboot@gmail.com" +auto_ccs: + - "tim.ruehsen@gmx.de" |