aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--projects/fastjson2/Dockerfile7
-rw-r--r--projects/fastjson2/build.sh3
2 files changed, 8 insertions, 2 deletions
diff --git a/projects/fastjson2/Dockerfile b/projects/fastjson2/Dockerfile
index 779a35ed5..e8c9f4ec8 100644
--- a/projects/fastjson2/Dockerfile
+++ b/projects/fastjson2/Dockerfile
@@ -18,8 +18,11 @@
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y maven
-RUN git clone --depth 1 https://github.com/google/fuzzing
-RUN cat fuzzing/dictionaries/json.dict > $OUT/JsonFuzzer.dict
+RUN git clone --depth 1 https://github.com/google/fuzzing && \
+ cat fuzzing/dictionaries/json.dict > $SRC/JsonFuzzer.dict
+
+RUN git clone --depth 1 https://github.com/dvyukov/go-fuzz-corpus && \
+ zip -q $SRC/JsonFuzzer_seed_corpus.zip go-fuzz-corpus/json/corpus/*
RUN git clone --depth 1 https://github.com/alibaba/fastjson
diff --git a/projects/fastjson2/build.sh b/projects/fastjson2/build.sh
index 2d545a4e1..121c3249a 100644
--- a/projects/fastjson2/build.sh
+++ b/projects/fastjson2/build.sh
@@ -15,6 +15,9 @@
#
################################################################################
+# Copy seed corpus and dictionary.
+mv $SRC/{*.zip,*.dict} $OUT
+
mvn package -Dmaven.test.skip=true -Djdk.version=15
CURRENT_VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate \
-Dexpression=project.version -q -DforceStdout)