Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion projects/libyang/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,15 @@ make

static_pcre=($(find /src/pcre2 -name "libpcre2-8.a"))

for fuzzer in lyd_parse_mem_json lyd_parse_mem_xml lys_parse_mem; do
for fuzzer in lys_parse_mem lyd_parse_mem_xml lyd_parse_mem_json lyd_parse_lyb lyd_parse_schema_mount_xml yang_parse_module; do
$CC $CFLAGS -c ../tests/fuzz/${fuzzer}.c -I./libyang -I./compat
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE ${fuzzer}.o -o $OUT/${fuzzer} \
./libyang.a ${static_pcre}

if [[ -d ../tests/fuzz/corpus/${fuzzer} ]]; then
find ../tests/fuzz/corpus/${fuzzer} -type f -exec \
zip -qj $OUT/${fuzzer}_seed_corpus.zip {} +
fi
done

# Build test
Expand Down
1 change: 1 addition & 0 deletions projects/symphonia/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ RUN git clone https://github.com/pdeljanov/Symphonia $SRC/symphonia
WORKDIR $SRC/symphonia/symphonia

COPY build.sh $SRC/
COPY dicts/ $SRC/dicts/
9 changes: 9 additions & 0 deletions projects/symphonia/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ cargo fuzz build -O

cargo fuzz list | while read -r target; do
cp "fuzz/target/x86_64-unknown-linux-gnu/release/$target" "$OUT/"

# ClusterFuzz automatically uses $OUT/<target>.dict if present. Dictionaries
# are keyed by format: the part of the target name after the first underscore
# (decode_mpa -> mpa.dict, demux_mkv -> mkv.dict). Raw-sample decoders
# (pcm, adpcm, alac, aac) have no syntax to tokenize and ship no dictionary.
format="${target#*_}"
if [ -f "$SRC/dicts/$format.dict" ]; then
cp "$SRC/dicts/$format.dict" "$OUT/$target.dict"
fi
done
44 changes: 44 additions & 0 deletions projects/symphonia/dicts/aiff.dict
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# IFF container structure
"FORM"
"AIFF"
"AIFC"
"FVER"
# Chunk identifiers
"COMM"
"SSND"
"MARK"
"COMT"
"ANNO"
"NAME"
"AUTH"
"APPL"
"ID3 "
# AIFF-C compression types
"NONE"
"none"
"sowt"
"SOWT"
"twos"
"TWOS"
"raw "
"RAW "
"in24"
"IN24"
"in32"
"IN32"
"23ni"
"23NI"
"fl32"
"FL32"
"fl64"
"FL64"
"ulaw"
"ULAW"
"alaw"
"ALAW"
"ima4"
"MAC3"
"MAC6"
"pdos"
# Common COMM chunk size (18 bytes, big-endian)
comm_size="\x00\x00\x00\x12"
Loading
Loading