aboutsummaryrefslogtreecommitdiff
path: root/projects
diff options
context:
space:
mode:
authorFabian Meumertzheim <meumertzheim@code-intelligence.com>2021-03-22 14:36:47 +0100
committerGitHub <noreply@github.com>2021-03-22 06:36:47 -0700
commitc03d25ff4c6bf158afb5380d357ef92f5b4ae062 (patch)
tree0b8af06ba964ede429e3b67ac021e5f30c50cbc3 /projects
parent6156b81488970ca5d51b53b5a8bbe6a0bc120f78 (diff)
downloadoss-fuzz-c03d25ff4c6bf158afb5380d357ef92f5b4ae062.tar.gz
[fastjson2] Fix dictionary and add seed corpus (#5468)
Diffstat (limited to 'projects')
-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)