diff options
author | K.Kosako <kkosako0@gmail.com> | 2020-04-30 10:17:46 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 18:17:46 -0700 |
commit | 6527c33b77cd78f8de27d19a1f9b1f6c5e24581b (patch) | |
tree | 33aafea826277c075bedff5430026bdafaa3a7b0 /projects/oniguruma | |
parent | 1acee225473f90da0c6e5ad8b985c9f02fbbeb83 (diff) | |
download | oss-fuzz-6527c33b77cd78f8de27d19a1f9b1f6c5e24581b.tar.gz |
Add project oniguruma (#3730)
* add projects/oniguruma
* add language into project.yaml
* update by review
* revert some previous changes to pass the Travis tests
Diffstat (limited to 'projects/oniguruma')
-rw-r--r-- | projects/oniguruma/.gitignore | 2 | ||||
-rw-r--r-- | projects/oniguruma/Dockerfile | 25 | ||||
-rwxr-xr-x | projects/oniguruma/build.sh | 33 | ||||
-rw-r--r-- | projects/oniguruma/fuzzer.options | 0 | ||||
-rw-r--r-- | projects/oniguruma/project.yaml | 7 |
5 files changed, 67 insertions, 0 deletions
diff --git a/projects/oniguruma/.gitignore b/projects/oniguruma/.gitignore new file mode 100644 index 000000000..f181609e4 --- /dev/null +++ b/projects/oniguruma/.gitignore @@ -0,0 +1,2 @@ +/oniguruma +/fuzzer.options.* diff --git a/projects/oniguruma/Dockerfile b/projects/oniguruma/Dockerfile new file mode 100644 index 000000000..3042d2fe1 --- /dev/null +++ b/projects/oniguruma/Dockerfile @@ -0,0 +1,25 @@ +# Copyright 2020 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 kkosako0@gmail.com + +RUN apt-get update && apt-get install -y make autoconf automake libtool +RUN git clone --depth 1 https://github.com/kkos/oniguruma.git oniguruma + +WORKDIR oniguruma +COPY build.sh $SRC/ +COPY fuzzer.options $SRC/oniguruma/harnesses diff --git a/projects/oniguruma/build.sh b/projects/oniguruma/build.sh new file mode 100755 index 000000000..4ebd5c1e4 --- /dev/null +++ b/projects/oniguruma/build.sh @@ -0,0 +1,33 @@ +#!/bin/bash -eu +# Copyright 2020 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. +# +################################################################################ + +# build project +./autogen.sh +./configure +make clean +make -j$(nproc) + +FUZZ_SRCDIR=harnesses +FUZZ_TARGET=fuzzer + +# build fuzzer +$CC $CFLAGS -o $FUZZ_SRCDIR/fuzzer_syntax.o -I src -c -DSYNTAX_TEST $FUZZ_SRCDIR/base.c +$CXX $CXXFLAGS -o $OUT/$FUZZ_TARGET $FUZZ_SRCDIR/fuzzer_syntax.o $LIB_FUZZING_ENGINE src/.libs/libonig.a + +# setup files +cp $FUZZ_SRCDIR/$FUZZ_TARGET.options $OUT/ +cp $FUZZ_SRCDIR/ascii_compatible.dict $OUT/$FUZZ_TARGET.dict diff --git a/projects/oniguruma/fuzzer.options b/projects/oniguruma/fuzzer.options new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/projects/oniguruma/fuzzer.options diff --git a/projects/oniguruma/project.yaml b/projects/oniguruma/project.yaml new file mode 100644 index 000000000..37ad02d7b --- /dev/null +++ b/projects/oniguruma/project.yaml @@ -0,0 +1,7 @@ +homepage: "https://github.com/kkos/oniguruma" +language: c +primary_contact: "kkosako0@gmail.com" +sanitizers: + - address + - undefined + - memory |