Skip to content

Commit

Permalink
oss-fuzz: include generated corpora in the final zip file
Browse files Browse the repository at this point in the history
Since the files with generated directives are now automatically
generated during build, they're now under the respective build directory
which the current oss-fuzz CI script didn't account for.

Follow-up to: #24958
Fixes: #25859

(cherry picked from commit bef8d18)

Related: #2176918
  • Loading branch information
mrc0mmand authored and jamacku committed Mar 11, 2023
1 parent fd7d93a commit a810aef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/oss-fuzz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,10 @@ rm -rf "$hosts"
# The seed corpus is a separate flat archive for each fuzzer,
# with a fixed name ${fuzzer}_seed_corpus.zip.
for d in test/fuzz/fuzz-*; do
zip -jqr "$OUT/$(basename "$d")_seed_corpus.zip" "$d"
fuzzer="$(basename "$d")"
# Include the build-generated corpora if any as well
readarray -t generated < <(find "$build/test/fuzz" -maxdepth 1 -name "${fuzzer}*" -type f)
zip -jqr "$OUT/${fuzzer}_seed_corpus.zip" "$d" "${generated[@]}"
done

# get fuzz-dns-packet corpus
Expand Down

0 comments on commit a810aef

Please sign in to comment.