diff options
author | YannisGuyon <7632072+YannisGuyon@users.noreply.github.com> | 2018-09-24 16:09:48 +0200 |
---|---|---|
committer | Max Moroz <dor3s1@gmail.com> | 2018-09-24 07:09:48 -0700 |
commit | 42d2d3798054605798bd1d36358f2aad2a43968e (patch) | |
tree | 90a8237cfc1fcee7d389c864dcbe864d4bbc22c5 /projects/libwebp | |
parent | f7fe63f80437199a4437797fb71af72f4348f9c2 (diff) | |
download | oss-fuzz-42d2d3798054605798bd1d36358f2aad2a43968e.tar.gz |
[libwebp] webp_enc_dec: Replace cruncher by lossy alpha encoding (#1838)
* Add new fuzz target for encoding and misc
- Add fuzz_webp_enc_dec and adapt Dockerfile, build.sh
- Lint existing targets
- Add license headers
- Increase fuzz.dict
* webp_enc_dec: Convert input images to inline C arrays
Local files are not available on oss-fuzz servers.
* webp_enc_dec: Fix timeout by skipping crusher
The target fuzz_webp_enc_dec with msan crashes (timeout)
on a 128*128px image encoding with max compression (crusher).
Reduce crusher encoding to 16*16px and below.
Bug report 10423
* webp_enc_dec: Replace cruncher by lossy alpha encoding
The target fuzz_webp_enc_dec with msan crashes (timeout)
during encoding with max compression (cruncher).
Reduce alpha cruncher encoding to 16*16px and below.
Bug report 10634
Diffstat (limited to 'projects/libwebp')
-rw-r--r-- | projects/libwebp/fuzz_webp_enc_dec.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/projects/libwebp/fuzz_webp_enc_dec.cc b/projects/libwebp/fuzz_webp_enc_dec.cc index f50c6c954..993c554f9 100644 --- a/projects/libwebp/fuzz_webp_enc_dec.cc +++ b/projects/libwebp/fuzz_webp_enc_dec.cc @@ -186,6 +186,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) { pic.width * pic.height >= 16 * 16) { config.lossless = 0; } + if (config.alpha_quality == 100 && config.method == 6 && + pic.width * pic.height >= 16 * 16) { + config.alpha_quality = 99; + } // Encode. WebPMemoryWriter memory_writer; |