mirror of https://github.com/google/oss-fuzz.git
[mp4parse-rust] Build better avif corpus (#4558)
This commit is contained in:
parent
7c73e6c1d6
commit
3226bd66d2
|
@ -17,7 +17,7 @@
|
|||
FROM gcr.io/oss-fuzz-base/base-builder
|
||||
RUN apt-get update && apt-get install -y make autoconf automake libtool curl cmake python llvm-dev libclang-dev clang
|
||||
|
||||
RUN git clone --depth 1 https://github.com/mozilla/mp4parse-rust mp4parse-rust
|
||||
RUN git clone --depth 1 --recursive https://github.com/mozilla/mp4parse-rust mp4parse-rust
|
||||
WORKDIR mp4parse-rust
|
||||
|
||||
COPY build.sh default.options $SRC/
|
||||
|
|
|
@ -19,9 +19,14 @@
|
|||
PROJECT_DIR=$SRC/mp4parse-rust
|
||||
cd $PROJECT_DIR/mp4parse_capi/fuzz && cargo fuzz build -O --debug-assertions
|
||||
|
||||
mkdir $PROJECT_DIR/corpus
|
||||
cp $PROJECT_DIR/mp4parse/tests/*.mp4 $PROJECT_DIR/corpus
|
||||
cp $PROJECT_DIR/mp4parse_capi/tests/*.mp4 $PROJECT_DIR/corpus
|
||||
# collect avif files
|
||||
mkdir $PROJECT_DIR/avif_corpus
|
||||
find $PROJECT_DIR/mp4parse -type f -name '*.avif' -exec cp '{}' $PROJECT_DIR/avif_corpus \;
|
||||
|
||||
# collect mp4 files
|
||||
mkdir $PROJECT_DIR/mp4_corpus
|
||||
find $PROJECT_DIR/mp4parse/tests -type f -name '*.mp4' -exec cp '{}' $PROJECT_DIR/mp4_corpus \;
|
||||
find $PROJECT_DIR/mp4parse_capi/tests/ -type f -name '*.mp4' -exec cp '{}' $PROJECT_DIR/mp4_corpus \;
|
||||
|
||||
FUZZ_TARGET_OUTPUT_DIR=$PROJECT_DIR/mp4parse_capi/fuzz/target/x86_64-unknown-linux-gnu/release
|
||||
for f in $SRC/mp4parse-rust/mp4parse_capi/fuzz/fuzz_targets/*.rs
|
||||
|
@ -30,5 +35,5 @@ do
|
|||
cp $FUZZ_TARGET_OUTPUT_DIR/$FUZZ_TARGET_NAME $OUT/
|
||||
cp $PROJECT_DIR/mp4parse_capi/fuzz/mp4.dict $OUT/$FUZZ_TARGET_NAME.dict
|
||||
cp $SRC/default.options $OUT/$FUZZ_TARGET_NAME.options
|
||||
zip -jr $OUT/${FUZZ_TARGET_NAME}_seed_corpus.zip $PROJECT_DIR/corpus/
|
||||
zip -jr $OUT/${FUZZ_TARGET_NAME}_seed_corpus.zip $PROJECT_DIR/${FUZZ_TARGET_NAME}_corpus/
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue