mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 13:18:22 +01:00
animencoder_fuzzer: no WebPAnimEncoderAssemble check w/nallocfuzz
This function may fail due to allocation failures. Use the
NALLOC_FUZZ_VERSION environment variable to detect the engine. This was
added in:
9c9a9883cc
Change-Id: Ia5b6fd9458ffa1f810152a10ab49a48c75d17687
This commit is contained in:
parent
6be9bf8bae
commit
b92deba353
@ -164,7 +164,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* const data, size_t size) {
|
||||
}
|
||||
WebPData webp_data;
|
||||
WebPDataInit(&webp_data);
|
||||
if (!WebPAnimEncoderAssemble(enc, &webp_data)) {
|
||||
// Tolerate failures when running under the nallocfuzz engine as allocations
|
||||
// during assembly may fail.
|
||||
if (!WebPAnimEncoderAssemble(enc, &webp_data) &&
|
||||
getenv("NALLOC_FUZZ_VERSION") == nullptr) {
|
||||
fprintf(stderr, "WebPAnimEncoderAssemble failed: %s.\n",
|
||||
WebPAnimEncoderGetError(enc));
|
||||
WebPAnimEncoderDelete(enc);
|
||||
|
Loading…
Reference in New Issue
Block a user