diff options
author | FeliciaLim <FeliciaLim@users.noreply.github.com> | 2017-02-14 18:14:17 -0800 |
---|---|---|
committer | Abhishek Arya <inferno@chromium.org> | 2017-02-14 18:14:17 -0800 |
commit | d83a22c432b662e26b199a8600f6e1b01032430c (patch) | |
tree | 197aeb2cbab04ba96838a1f09e3c1821a2a13199 /projects/opus | |
parent | c3a2558578299d71dd6cdd9549899630dcae676c (diff) | |
download | oss-fuzz-d83a22c432b662e26b199a8600f6e1b01032430c.tar.gz |
[opus] Add Dockerfile and build.sh for decoder (#385)
* [opus] Add Dockerfile and build.sh for decoder
* [opus] http->https and updated auto_ccs in project.yaml
* [opus] Fix copying .options and test corpus zip files
Diffstat (limited to 'projects/opus')
-rw-r--r-- | projects/opus/Dockerfile | 24 | ||||
-rw-r--r-- | projects/opus/build.sh | 55 | ||||
-rw-r--r-- | projects/opus/project.yaml | 2 |
3 files changed, 81 insertions, 0 deletions
diff --git a/projects/opus/Dockerfile b/projects/opus/Dockerfile new file mode 100644 index 000000000..e8551de71 --- /dev/null +++ b/projects/opus/Dockerfile @@ -0,0 +1,24 @@ +# Copyright 2017 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 ossfuzz/base-builder +MAINTAINER flim@google.com +RUN apt-get install -y make autoconf automake libtool wget + +RUN git clone https://git.xiph.org/opus.git +RUN wget https://opus-codec.org/static/testvectors/opus_testvectors.tar.gz +WORKDIR opus +COPY build.sh $SRC/ diff --git a/projects/opus/build.sh b/projects/opus/build.sh new file mode 100644 index 000000000..1bbb5745f --- /dev/null +++ b/projects/opus/build.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2017 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. +# +############################################################################## +set -eu + +FUZZERS="opus_decode_fuzzer" +BUILDS=(floating fixed) + +tar xvf $SRC/opus_testvectors.tar.gz + +./autogen.sh + +for build in "${BUILDS[@]}"; do + case "$build" in + floating) + extra_args="" + ;; + fixed) + extra_args=" --enable-fixed-point --enable-check-asm" + ;; + esac + + ./configure $extra_args --enable-static --disable-shared --disable-doc + make clean + make -j$(nproc) + + # Build all fuzzers + for fuzzer in $FUZZERS; do + $CC $CFLAGS -c -Iinclude \ + tests/$fuzzer.c \ + -o $fuzzer.o + $CXX $CXXFLAGS \ + $fuzzer.o \ + -o $OUT/${fuzzer}_${build} \ + -lFuzzingEngine .libs/libopus.a + + # Setup the .options and test corpus zip files using the corresponding + # fuzzer's name + cp tests/$fuzzer.options $OUT/${fuzzer}_${build}.options + zip -r $OUT/${fuzzer}_${build}_seed_corpus.zip opus_testvectors/ + done +done diff --git a/projects/opus/project.yaml b/projects/opus/project.yaml index 2198a71fd..ee50e8d79 100644 --- a/projects/opus/project.yaml +++ b/projects/opus/project.yaml @@ -1,2 +1,4 @@ homepage: "https://opus-codec.org/" primary_contact: "jmvalin@jmvalin.ca" +auto_ccs: +- "flim@google.com" |