Skip to content

Commit

Permalink
Add new project: mp4san
Browse files Browse the repository at this point in the history
  • Loading branch information
jessa0 committed Jul 7, 2023
1 parent f33bcf5 commit 51cf40e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
20 changes: 20 additions & 0 deletions projects/mp4san/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM gcr.io/oss-fuzz-base/base-builder-rust

RUN git clone --depth 1 https://github.com/privacyresearchgroup/mp4san mp4san
WORKDIR mp4san

COPY build.sh $SRC/
29 changes: 29 additions & 0 deletions projects/mp4san/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash -eu
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

PROJECT_DIR=$SRC/mp4san
FUZZ_DIR=$PROJECT_DIR/mp4san/fuzz
cd $FUZZ_DIR && cargo fuzz build -O --debug-assertions

FUZZ_INPUT_DIR=$FUZZ_DIR/input

FUZZ_TARGET_OUTPUT_DIR=$FUZZ_DIR/target/x86_64-unknown-linux-gnu/release/
for fuzz_target in $FUZZ_DIR/fuzz_targets/*.rs
do
FUZZ_TARGET_NAME=$(basename ${fuzz_target%.*})
cp $FUZZ_TARGET_OUTPUT_DIR/$FUZZ_TARGET_NAME $OUT/
cp $FUZZ_DIR/mp4.dict $OUT/$FUZZ_TARGET_NAME.dict
zip -jr $OUT/${FUZZ_TARGET_NAME}_seed_corpus.zip $FUZZ_INPUT_DIR/
done
10 changes: 10 additions & 0 deletions projects/mp4san/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
homepage: "https://github.com/privacyresearchgroup/mp4san"
language: rust
primary_contact: "[email protected]"
main_repo: "https://github.com/privacyresearchgroup/mp4san"
vendor_ccs:
- "[email protected]"
sanitizers:
- address
fuzzing_engines:
- libfuzzer

0 comments on commit 51cf40e

Please sign in to comment.