diff --git a/projects/skia/BUILD.gn.diff b/projects/skia/BUILD.gn.diff index a0b73c13c..10693d571 100644 --- a/projects/skia/BUILD.gn.diff +++ b/projects/skia/BUILD.gn.diff @@ -319,3 +319,28 @@ test_app("api_polyutils") { ":skia", ] } + +test_app("android_codec") { + sources = [ + "fuzz/Fuzz.cpp", + "fuzz/FuzzCommon.cpp", + "fuzz/oss_fuzz/FuzzAndroidCodec.cpp", + ] + deps = [ + ":flags", + ":skia", + ] +} + +test_app("image_decode_incremental") { + sources = [ + "fuzz/Fuzz.cpp", + "fuzz/FuzzCommon.cpp", + "fuzz/oss_fuzz/FuzzIncrementalImage.cpp", + ] + deps = [ + ":flags", + ":skia", + ] +} + diff --git a/projects/skia/Dockerfile b/projects/skia/Dockerfile index 283ac1003..4ee981a86 100644 --- a/projects/skia/Dockerfile +++ b/projects/skia/Dockerfile @@ -81,10 +81,14 @@ COPY image_filter_deserialize.options $SRC/skia/image_filter_deserialize.options COPY image_filter_deserialize_width.options $SRC/skia/image_filter_deserialize_width.options COPY textblob_deserialize.options $SRC/skia/textblob_deserialize.options COPY path_deserialize.options $SRC/skia/path_deserialize.options -COPY image_decode.options $SRC/skia/image_decode.options -COPY animated_image_decode.options $SRC/skia/animated_image_decode.options COPY encoder.options $SRC/skia/encoder.options +# Codec fuzzers can share options +COPY image_codec.options $SRC/skia/android_codec.options +COPY image_codec.options $SRC/skia/animated_image_decode.options +COPY image_codec.options $SRC/skia/image_decode.options +COPY image_codec.options $SRC/skia/image_decode_incremental.options + # API fuzzers can share options COPY api_fuzzers.options $SRC/skia/api_draw_functions.options COPY api_fuzzers.options $SRC/skia/api_gradients.options diff --git a/projects/skia/build.sh b/projects/skia/build.sh index 959cde214..16d89858c 100644 --- a/projects/skia/build.sh +++ b/projects/skia/build.sh @@ -91,7 +91,7 @@ $SRC/depot_tools/ninja -C out/Fuzz region_deserialize region_set_path \ jpeg_encoder webp_encoder skottie_json \ textblob_deserialize skjson \ api_null_canvas api_image_filter api_pathop \ - api_polyutils + api_polyutils android_codec image_decode_incremental $SRC/depot_tools/ninja -C out/Fuzz_mem_constraints image_filter_deserialize \ api_raster_n32_canvas \ @@ -189,3 +189,12 @@ cp ./canvas_seed_corpus.zip $OUT/api_null_canvas_seed_corpus.zip cp out/Fuzz/api_polyutils $OUT/api_polyutils cp ./api_polyutils.options $OUT/api_polyutils.options cp ./api_polyutils_seed_corpus.zip $OUT/api_polyutils_seed_corpus.zip + +# These 2 can use the same corpus as the (non animated) image_decode. +cp out/Fuzz/android_codec $OUT/android_codec +cp ./android_codec.options $OUT/android_codec.options +cp ./image_decode_seed_corpus.zip $OUT/android_codec_seed_corpus.zip. + +cp out/Fuzz/image_decode_incremental $OUT/image_decode_incremental +cp ./image_decode_incremental.options $OUT/image_decode_incremental.options +cp ./image_decode_seed_corpus.zip $OUT/image_decode_incremental_seed_corpus.zip \ No newline at end of file diff --git a/projects/skia/animated_image_decode.options b/projects/skia/image_codec.options similarity index 100% rename from projects/skia/animated_image_decode.options rename to projects/skia/image_codec.options diff --git a/projects/skia/image_decode.options b/projects/skia/image_decode.options deleted file mode 100644 index 470974194..000000000 --- a/projects/skia/image_decode.options +++ /dev/null @@ -1,2 +0,0 @@ -[libfuzzer] -max_len = 10240 \ No newline at end of file