diff --git a/projects/libmediaart/Dockerfile b/projects/libmediaart/Dockerfile deleted file mode 100644 index f0459ae21..000000000 --- a/projects/libmediaart/Dockerfile +++ /dev/null @@ -1,41 +0,0 @@ -# Copyright 2018 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 python3-pip pkg-config \ - valac gtk-doc-tools libffi-dev libexpat1-dev -RUN pip3 install meson==0.55.3 ninja - -ADD https://ftp.gnome.org/pub/gnome/sources/glib/2.64/glib-2.64.2.tar.xz $SRC -RUN tar xvJf $SRC/glib-2.64.2.tar.xz -RUN git clone --depth 1 https://gitlab.gnome.org/GNOME/gdk-pixbuf.git -RUN git clone --depth 1 --single-branch --branch fuzzing https://gitlab.gnome.org/ceyhunalp/libmediaart.git - -RUN git clone --depth 1 https://github.com/dvyukov/go-fuzz-corpus.git && \ - git clone --depth 1 https://github.com/MozillaSecurity/fuzzdata.git && \ - mkdir corpus && \ - mv go-fuzz-corpus/jpeg/corpus/* corpus/ && \ - mv go-fuzz-corpus/png/corpus/* corpus/ && \ - mv fuzzdata/samples/jpg/* corpus/ && \ - mv fuzzdata/samples/png/common/* corpus/ && \ - zip -q $SRC/libmediaart_seed_corpus.zip corpus/* && \ - rm -rf fuzzdata go-fuzz-corpus corpus -ADD https://raw.githubusercontent.com/google/fuzzing/master/dictionaries/png.dict $SRC/png.dict -ADD https://raw.githubusercontent.com/google/fuzzing/master/dictionaries/jpeg.dict $SRC/jpeg.dict -RUN awk 1 $SRC/*.dict > $SRC/libmediaart.dict && \ - rm -f $SRC/png.dict $SRC/jpeg.dict - -WORKDIR $SRC/libmediaart -COPY build.sh $SRC/ diff --git a/projects/libmediaart/build.sh b/projects/libmediaart/build.sh deleted file mode 100755 index 997c91803..000000000 --- a/projects/libmediaart/build.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/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. -# -################################################################################ -PREFIX=$WORK/prefix -mkdir -p $PREFIX - -export PKG_CONFIG="`which pkg-config` --static" -export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig -export PATH=$PREFIX/bin:$PATH - -BUILD=$WORK/build - -rm -rf $WORK/* -rm -rf $BUILD -mkdir -p $BUILD - -# Build glib -pushd $SRC/glib-2.64.2 -meson \ - --prefix=$PREFIX \ - --libdir=lib \ - --default-library=static \ - -Db_lundef=false \ - -Doss_fuzz=enabled \ - -Dlibmount=disabled \ - -Dinternal_pcre=true \ - _builddir -ninja -C _builddir -ninja -C _builddir install -popd - -# Build gdk-pixbuf -pushd $SRC/gdk-pixbuf -meson \ - --prefix=$PREFIX \ - --libdir=lib \ - --default-library=static \ - -Dintrospection=disabled \ - -Dbuiltin_loaders='all' \ - _builddir -ninja -C _builddir -ninja -C _builddir install -popd - -# Build libmediaart -pushd $SRC/libmediaart -meson \ - -Ddefault_library=static \ - -Ddisable_tests=true \ - -Dintrospection=disabled \ - $BUILD/libmediaart -ninja -C $BUILD/libmediaart libmediaart/libmediaart-2.0.a - -mv $SRC/{*.zip,*.dict} $OUT - -if [ ! -f "${OUT}/libmediaart_seed_corpus.zip" ]; then - echo "missing seed corpus" - exit 1 -fi - -if [ ! -f "${OUT}/libmediaart.dict" ]; then - echo "missing dictionary" - exit 1 -fi - -PREDEPS_LDFLAGS="-Wl,-Bdynamic -ldl -lm -lc -pthread -lrt -lpthread" -DEPS="gmodule-2.0 glib-2.0 gio-2.0 gobject-2.0 gdk-pixbuf-2.0" -BUILD_CFLAGS="$CFLAGS `pkg-config --static --cflags $DEPS`" -BUILD_LDFLAGS="-Wl,-static `pkg-config --static --libs $DEPS`" - -fuzzers=$(find $SRC/libmediaart/fuzzing/ -name "*_fuzzer.c") -for f in $fuzzers; do - fuzzer_name=$(basename $f .c) - if [[ $fuzzer_name != "process_file_fuzzer" && $fuzzer_name != "get_file_fuzzer" ]]; then - $CC $CFLAGS $BUILD_CFLAGS -I. -c $f -o $WORK/${fuzzer_name}.o - $CXX $CXXFLAGS \ - $WORK/${fuzzer_name}.o -o $OUT/${fuzzer_name} \ - $PREDEPS_LDFLAGS \ - $BUILD/libmediaart/libmediaart/libmediaart-2.0.a \ - $BUILD_LDFLAGS \ - $LIB_FUZZING_ENGINE \ - -Wl,-Bdynamic - ln -sf $SRC/libmediaart_seed_corpus.zip $OUT/${fuzzer_name}_seed_corpus.zip - ln -sf $SRC/libmediaart.dict $OUT/${fuzzer_name}.dict - fi -done diff --git a/projects/libmediaart/project.yaml b/projects/libmediaart/project.yaml deleted file mode 100644 index f1ac76da7..000000000 --- a/projects/libmediaart/project.yaml +++ /dev/null @@ -1,6 +0,0 @@ -homepage: https://gitlab.gnome.org/GNOME/libmediaart -language: c -primary_contact: security-tps@google.com -sanitizers: - - address - - undefined