From 3c1aba15b52f3c92a9530f0321169d86979b4b56 Mon Sep 17 00:00:00 2001 From: YannisGuyon <7632072+YannisGuyon@users.noreply.github.com> Date: Mon, 8 Oct 2018 19:08:49 +0200 Subject: [PATCH] [libwebp] webp_enc_dec: Limit alpha_quality to 99 when method is 6 (#1860) webp_enc_dec: Limit alpha_quality to 99 when method is 6 The target fuzz_webp_enc_dec with asan crashes (timeout) during encoding with heavy alpha compression. Clamp alpha compression parameters for images bigger than 16*16. Bug report 10838 --- projects/libwebp/fuzz_webp_enc_dec.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/projects/libwebp/fuzz_webp_enc_dec.cc b/projects/libwebp/fuzz_webp_enc_dec.cc index 84726eac3..c1830e5d1 100644 --- a/projects/libwebp/fuzz_webp_enc_dec.cc +++ b/projects/libwebp/fuzz_webp_enc_dec.cc @@ -193,6 +193,9 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) { config.quality = 99.0f; } } + if (config.alpha_quality == 100 && config.method == 6) { + config.alpha_quality = 99; + } } // Encode.