[skia] Add more image codec fuzzers (#1882)

This commit is contained in:
Kevin Lubick 2018-10-17 09:42:10 -04:00 committed by Max Moroz
parent 274b597587
commit ea855f048a
5 changed files with 41 additions and 5 deletions

View File

@ -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",
]
}

View File

@ -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

View File

@ -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

View File

@ -1,2 +0,0 @@
[libfuzzer]
max_len = 10240