[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
This commit is contained in:
YannisGuyon 2018-10-08 19:08:49 +02:00 committed by jonathanmetzman
parent 2e867a3f6e
commit 3c1aba15b5
1 changed files with 3 additions and 0 deletions

View File

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