From cb4ac26402fc1595164dfdc8dfbba63979f28c2d Mon Sep 17 00:00:00 2001 From: DavidKorczynski Date: Wed, 24 Feb 2021 00:32:05 +0000 Subject: [PATCH] libredwg: initial integration. (#5226) * initial integration. * Updated the project yaml. * Updated projet to reflect upstream changes. --- projects/libredwg/Dockerfile | 23 +++++++++++++++++++ projects/libredwg/build.sh | 27 +++++++++++++++++++++++ projects/libredwg/fuzz_dwg_decode.options | 2 ++ projects/libredwg/project.yaml | 9 ++++++++ 4 files changed, 61 insertions(+) create mode 100755 projects/libredwg/Dockerfile create mode 100755 projects/libredwg/build.sh create mode 100644 projects/libredwg/fuzz_dwg_decode.options create mode 100755 projects/libredwg/project.yaml diff --git a/projects/libredwg/Dockerfile b/projects/libredwg/Dockerfile new file mode 100755 index 000000000..aaa99fb73 --- /dev/null +++ b/projects/libredwg/Dockerfile @@ -0,0 +1,23 @@ +# 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 autoconf libtool texinfo +RUN git clone https://github.com/LibreDWG/libredwg + +WORKDIR $SRC +COPY build.sh $SRC/ +COPY fuzz_dwg_decode.options $SRC/ diff --git a/projects/libredwg/build.sh b/projects/libredwg/build.sh new file mode 100755 index 000000000..b356d651b --- /dev/null +++ b/projects/libredwg/build.sh @@ -0,0 +1,27 @@ +#!/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. +# +################################################################################ + +cd libredwg +sh ./autogen.sh +./configure --disable-shared +make + +$CC $CFLAGS $LIB_FUZZING_ENGINE ./test/fuzz/fuzz_dwg_decode.c -o $OUT/fuzz_dwg_decode \ + src/.libs/libredwg.a -I./include -I./src + + +cp $SRC/fuzz_dwg_decode.options $OUT/fuzz_dwg_decode.options diff --git a/projects/libredwg/fuzz_dwg_decode.options b/projects/libredwg/fuzz_dwg_decode.options new file mode 100644 index 000000000..f9d09656c --- /dev/null +++ b/projects/libredwg/fuzz_dwg_decode.options @@ -0,0 +1,2 @@ +[libfuzzer] +detect_leaks=0 diff --git a/projects/libredwg/project.yaml b/projects/libredwg/project.yaml new file mode 100755 index 000000000..a9e5d4477 --- /dev/null +++ b/projects/libredwg/project.yaml @@ -0,0 +1,9 @@ +homepage: "https://github.com/LibreDWG/libredwg" +primary_contact: "reini.urban@gmail.com" +language: c +auto_ccs : + - "david@adalogics.com" +fuzzing_engines: + - libfuzzer + - honggfuzz +main_repo: 'https://github.com/LibreDWG/libredwg'