mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-19 20:08:28 +01:00
animdecoder_fuzzer: validate canvas size
avoids some OOMs due to extreme resolutions BUG=oss-fuzz:28658 Change-Id: I60b5fb3d7a7d17694a89237d521b851b0897e9fb
This commit is contained in:
parent
9eb2638119
commit
6325882327
@ -36,6 +36,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
|
||||
WebPAnimInfo info;
|
||||
if (!WebPAnimDecoderGetInfo(dec, &info)) return 0;
|
||||
if (!ImgIoUtilCheckSizeArgumentsOverflow(info.canvas_width * 4,
|
||||
info.canvas_height)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while (WebPAnimDecoderHasMoreFrames(dec)) {
|
||||
uint8_t* buf;
|
||||
|
Loading…
Reference in New Issue
Block a user