avcodec/pngdec: Check amount decoded
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 17 Aug 2019 21:55:34 +0000 (23:55 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 3 Feb 2020 22:59:07 +0000 (23:59 +0100)
commit861183f2e655ad5d399a8a23b6b6b48463962c5e
tree72f79c88479aa0f1f260a8a835d256e8136d6f70
parenteb64a5c6f94981e4a68ad65a6e445557e11c08fc
avcodec/pngdec: Check amount decoded

Fixes: Timeout (70sec -> 243ms)
Fixes: 16097/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5664690889293824
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5170612070252544
Fixes: 16927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5706325622784000
Fixes: 18705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APNG_fuzzer-5650989302677504

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pngdec.c