libredwg: initial integration. (#5226)

* initial integration.

* Updated the project yaml.

* Updated projet to reflect upstream changes.
This commit is contained in:
DavidKorczynski 2021-02-24 00:32:05 +00:00 committed by GitHub
parent 946298425d
commit cb4ac26402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 0 deletions

23
projects/libredwg/Dockerfile Executable file
View File

@ -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/

27
projects/libredwg/build.sh Executable file
View File

@ -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

View File

@ -0,0 +1,2 @@
[libfuzzer]
detect_leaks=0

9
projects/libredwg/project.yaml Executable file
View File

@ -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'