From 2be188445c591048c154232cadfcb86b0b3b640a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20L=C3=B6bl?= Date: Tue, 28 Jan 2025 19:05:29 +0100 Subject: [PATCH] cgif: add file fuzzer --- projects/cgif/Dockerfile | 2 +- projects/cgif/build.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/projects/cgif/Dockerfile b/projects/cgif/Dockerfile index 47221e16ba0d..de8a64fe9715 100644 --- a/projects/cgif/Dockerfile +++ b/projects/cgif/Dockerfile @@ -17,6 +17,6 @@ FROM gcr.io/oss-fuzz-base/base-builder RUN apt-get update && apt-get install -y python3-pip zip RUN pip3 install meson ninja -RUN git clone --depth 1 https://github.com/dloebl/cgif.git +RUN git clone --depth 1 --branch add-file-fuzzer https://github.com/dloebl/cgif.git WORKDIR cgif COPY build.sh $SRC/ diff --git a/projects/cgif/build.sh b/projects/cgif/build.sh index c20f15513652..4b1e3ad884e8 100644 --- a/projects/cgif/build.sh +++ b/projects/cgif/build.sh @@ -1,5 +1,5 @@ #!/bin/bash -eu -# Copyright 2023 Google Inc. +# Copyright 2025 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,7 +23,11 @@ meson install -C build meson test -C build cp "build/fuzz/cgif_fuzzer_seed_corpus.zip" $OUT/. +cp "build/fuzz/cgif_file_fuzzer_seed_corpus.zip" $OUT/. -# build cgif's fuzz target +# build cgif's fuzz targets $CXX $CXXFLAGS -o "$OUT/cgif_fuzzer" -I"$WORK/include" \ $LIB_FUZZING_ENGINE fuzz/cgif_fuzzer.c "$WORK/lib/libcgif.a" + +$CXX $CXXFLAGS -o "$OUT/cgif_file_fuzzer" -I"$WORK/include" \ + $LIB_FUZZING_ENGINE fuzz/cgif_file_fuzzer.c "$WORK/lib/libcgif.a"