aboutsummaryrefslogtreecommitdiff
path: root/projects/libwebp
diff options
context:
space:
mode:
authorYannisGuyon <7632072+YannisGuyon@users.noreply.github.com>2018-10-08 19:08:49 +0200
committerjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2018-10-08 10:08:49 -0700
commit3c1aba15b52f3c92a9530f0321169d86979b4b56 (patch)
tree2094440fee436ca9591e52ec57500c97af140d29 /projects/libwebp
parent2e867a3f6e93b1e219c13a50d1970656ca28fd5b (diff)
downloadoss-fuzz-3c1aba15b52f3c92a9530f0321169d86979b4b56.tar.gz
[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
Diffstat (limited to 'projects/libwebp')
-rw-r--r--projects/libwebp/fuzz_webp_enc_dec.cc3
1 files changed, 3 insertions, 0 deletions
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.