aboutsummaryrefslogtreecommitdiff
path: root/projects/fribidi
diff options
context:
space:
mode:
authorebraminio <ebrahim@gnu.org>2021-05-25 19:06:03 +0430
committerGitHub <noreply@github.com>2021-05-25 07:36:03 -0700
commit693dd5037f6740093e1d4260ad3ef960df9732b6 (patch)
tree491a0e8496feea930e3ef42faba2e9d9496e84b1 /projects/fribidi
parent4279eb7844f976e290f28176450043f5fd11f6ce (diff)
downloadoss-fuzz-693dd5037f6740093e1d4260ad3ef960df9732b6.tar.gz
[fribidi] Add fribidi-fuzzer (#5829)
Diffstat (limited to 'projects/fribidi')
-rw-r--r--projects/fribidi/Dockerfile22
-rwxr-xr-xprojects/fribidi/build.sh36
-rw-r--r--projects/fribidi/project.yaml17
3 files changed, 75 insertions, 0 deletions
diff --git a/projects/fribidi/Dockerfile b/projects/fribidi/Dockerfile
new file mode 100644
index 000000000..b4d9ea75d
--- /dev/null
+++ b/projects/fribidi/Dockerfile
@@ -0,0 +1,22 @@
+# Copyright 2021 Google LLC
+#
+# 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
+RUN apt-get update && apt-get install -y python3-pip pkg-config && \
+ pip3 install meson==0.53.0 ninja
+RUN git clone --depth 1 https://github.com/fribidi/fribidi.git
+WORKDIR fribidi
+COPY build.sh $SRC/
diff --git a/projects/fribidi/build.sh b/projects/fribidi/build.sh
new file mode 100755
index 000000000..aa8f60acc
--- /dev/null
+++ b/projects/fribidi/build.sh
@@ -0,0 +1,36 @@
+#!/bin/bash -eu
+# Copyright 2021 Google LLC
+#
+# 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.
+#
+################################################################################
+
+# setup
+build=$WORK/build
+
+# cleanup
+rm -rf $build
+mkdir -p $build
+
+# Build the library.
+meson --default-library=static --wrap-mode=nodownload -Ddocs=false \
+ -Dfuzzer_ldflags="$(echo $LIB_FUZZING_ENGINE)" \
+ $build \
+ || (cat build/meson-logs/meson-log.txt && false)
+
+# Build the fuzzers.
+ninja -v -j$(nproc) -C $build bin/fribidi-fuzzer
+mv $build/bin/fribidi-fuzzer $OUT/
+
+# Archive and copy to $OUT seed corpus if the build succeeded.
+zip $OUT/fribidi-fuzzer_seed_corpus.zip test/*.{input,reference} test/fuzzing/*
diff --git a/projects/fribidi/project.yaml b/projects/fribidi/project.yaml
new file mode 100644
index 000000000..7fbac3aa0
--- /dev/null
+++ b/projects/fribidi/project.yaml
@@ -0,0 +1,17 @@
+homepage: "https://github.com/fribidi/fribidi"
+language: c
+primary_contact: "dov.grobgeld@gmail.com"
+auto_ccs:
+ - "behdad.esfahbod@gmail.com"
+ - "behdad@gnu.org"
+ - "ebrahim@gnu.org"
+ - "dr.khaled.hosny@gmail.com"
+fuzzing_engines:
+ - libfuzzer
+ - afl
+ - honggfuzz
+sanitizers:
+ - address
+ - undefined
+ - memory
+main_repo: 'https://github.com/fribidi/fribidi.git'