File tree 2 files changed +14
-1
lines changed
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 1
1
FROM gcr.io/oss-fuzz-base/base-builder@sha256:14b332de0e18683f37386eaedbf735bc6e8d81f9c0e1138d620f2178e20cd30a
2
+ ENV MERGE_WITH_OSS_FUZZ_CORPORA=yes
2
3
COPY . $SRC/systemd
3
4
WORKDIR $SRC/systemd
4
5
COPY tools/oss-fuzz.sh $SRC/build.sh
Original file line number Diff line number Diff line change 35
35
apt-get update
36
36
apt-get install -y gperf m4 gettext python3-pip \
37
37
libcap-dev libmount-dev libkmod-dev \
38
- pkg-config wget python3-jinja2
38
+ pkg-config wget python3-jinja2 zipmerge
39
39
40
40
# gnu-efi is installed here to enable -Dgnu-efi behind which fuzz-bcd
41
41
# is hidden. It isn't linked against efi. It doesn't
@@ -98,3 +98,15 @@ wget -O "$OUT/fuzz-json.dict" https://raw.githubusercontent.com/rc0r/afl-fuzz/ma
98
98
find " $build " -maxdepth 1 -type f -executable -name " fuzz-*" -exec mv {} " $OUT " \;
99
99
find src -type f -name " fuzz-*.dict" -exec cp {} " $OUT " \;
100
100
cp src/fuzz/* .options " $OUT "
101
+
102
+ if [[ " $MERGE_WITH_OSS_FUZZ_CORPORA " == " yes" ]]; then
103
+ for f in " $OUT /" fuzz-* ; do
104
+ [[ -x " $f " ]] || continue
105
+ fuzzer=$( basename " $f " )
106
+ t=$( mktemp)
107
+ if wget -O " $t " " https://storage.googleapis.com/systemd-backup.clusterfuzz-external.appspot.com/corpus/libFuzzer/systemd_${fuzzer} /public.zip" ; then
108
+ zipmerge " $OUT /${fuzzer} _seed_corpus.zip" " $t "
109
+ fi
110
+ rm -rf " $t "
111
+ done
112
+ fi
You can’t perform that action at this time.
0 commit comments