diff options
author | Joachim Metz <joachim.metz@gmail.com> | 2020-07-15 03:32:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 18:32:14 -0700 |
commit | 9376cc216507f11401e6606dd22e631d63fb2525 (patch) | |
tree | 551ac1b0d3768b28fab5105cc0d5e03961178a09 | |
parent | 9c16aecf485fd4f28278783d0b3cbb4fa6523d4d (diff) |
Added libregf integration (#4126)
-rw-r--r-- | projects/libregf/Dockerfile | 23 | ||||
-rwxr-xr-x | projects/libregf/build.sh | 29 | ||||
-rw-r--r-- | projects/libregf/project.yaml | 10 |
3 files changed, 62 insertions, 0 deletions
diff --git a/projects/libregf/Dockerfile b/projects/libregf/Dockerfile new file mode 100644 index 00000000..ca2168c1 --- /dev/null +++ b/projects/libregf/Dockerfile @@ -0,0 +1,23 @@ +# 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 + +RUN apt-get update && apt-get install -y make autoconf automake autopoint libtool pkg-config + +RUN git clone --depth 1 https://github.com/libyal/libregf.git libregf +WORKDIR libregf +COPY build.sh $SRC/ diff --git a/projects/libregf/build.sh b/projects/libregf/build.sh new file mode 100755 index 00000000..07ce84e1 --- /dev/null +++ b/projects/libregf/build.sh @@ -0,0 +1,29 @@ +#!/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. +# +################################################################################ + +# Prepare the project source for build. +./synclibs.sh +./synctestdata.sh +./autogen.sh +./configure --enable-shared=no + +# Build the project and fuzzer binaries. +make -j$(nproc) LIB_FUZZING_ENGINE=${LIB_FUZZING_ENGINE} + +# Copy the fuzzer binaries and test data to the output directory. +find ossfuzz -executable -type f -exec cp {} ${OUT} \; +(cd tests/input/public/ && zip ${OUT}/file_fuzzer_seed_corpus.zip *) diff --git a/projects/libregf/project.yaml b/projects/libregf/project.yaml new file mode 100644 index 00000000..7aa1e715 --- /dev/null +++ b/projects/libregf/project.yaml @@ -0,0 +1,10 @@ +homepage: "https://github.com/libyal/libregf" +language: c +primary_contact: "joachim.metz@gmail.com" +sanitizers: +- address +- memory +- undefined +architectures: +- x86_64 +- i386 |