diff options
-rwxr-xr-x | test/ossfuzz.sh | 7 | ||||
-rw-r--r-- | test/postscript.dict | 58 |
2 files changed, 63 insertions, 2 deletions
diff --git a/test/ossfuzz.sh b/test/ossfuzz.sh index 885e18d..0ac9436 100755 --- a/test/ossfuzz.sh +++ b/test/ossfuzz.sh @@ -1,8 +1,6 @@ # This script is meant to be run by # https://github.com/google/oss-fuzz/blob/master/projects/libspectre/Dockerfile -wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs950/ghostscript-9.50.tar.gz -tar xvzf ghostscript-9.50.tar.gz cd ghostscript-9.50 ./configure make -j$(nproc) soinstall @@ -18,3 +16,8 @@ $CXX $CXXFLAGS $SRC/libspectre/test/spectre_read_fuzzer.c -I. \ -o $OUT/spectre_read_fuzzer \ $LIB_FUZZING_ENGINE $SRC/libspectre/libspectre/.libs/libspectre.a \ $SRC/libspectre/ghostscript-9.50/bin/gs.a + +find $SRC/libspectre/ghostscript-9.50 -name "*.ps" | \ + xargs zip $OUT/spectre_read_fuzzer_seed_corpus.zip + +cp $SRC/libspectre/test/postscript.dict $OUT/spectre_read_fuzzer.dict diff --git a/test/postscript.dict b/test/postscript.dict new file mode 100644 index 0000000..7ba2634 --- /dev/null +++ b/test/postscript.dict @@ -0,0 +1,58 @@ +#PostScript fuzzing dictionary made for fuzzing libspectre + +"%!PS-Adobe-" +"EPSF-*" + +"%%" + +"%%BoundingBox:" +"%%CreationDate:" +"%%Creator:" +"%%Orientation:" +"%%Pages:" +"%%PageOrder:" +"%%Title:" +"%%DocumentMedia:" +"%%DocumentPaperSizes:" +"%%EndComments" + +"%%BeginPreview" +"%%EndPreview" + +"%%BeginDefaults" +"%%PageBoundingBox:" +"%%PageOrientation:" +"%%PageMedia:" +"%%EndDefaults" + +"%%BeginProlog" +"%%EndProlog" + +"%%BeginSetup" +"%%PageBoundingBox:" +"%%PageOrientation:" +"%%PaperSize:" +"%%EndSetup" + +"%%Page:" +"%%PageBoundingBox:" +"%%PageOrientation:" +"%%PageMedia:" +"%%PaperSize:" + +"%%Trailer" +"%%BoundingBox: " +"%%Orientation:" +"%%Pages:" +"%%PageOrder:" +"%%EOF" + +"(atend)" +"atend" +"Portrait" +"Landscape" +"Seascape" +"UpsideDown" +"Ascend" +"Descend" +"Special" |