avcodec/pngdec: Check nb_blocks
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 27 Apr 2019 21:49:33 +0000 (23:49 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 25 May 2019 00:04:43 +0000 (02:04 +0200)
commit4fd74a2b104f3e67f251b67099f5855c386a55bd
tree7c6042b2e59cc2741c190ed650d1a81461c15a49
parent1eb54323c82ff6eff18553fd3f2788a695bdf812
avcodec/pngdec: Check nb_blocks

Fixes: Timeout (23sec -> 0.5sec)
Fixes: 14329/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LSCR_fuzzer-5679252923482112

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