Skip to content

Commit

Permalink
cgif: add file fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
dloebl committed Jan 28, 2025
1 parent 375486d commit 2be1884
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion projects/cgif/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
8 changes: 6 additions & 2 deletions projects/cgif/build.sh
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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"

0 comments on commit 2be1884

Please sign in to comment.