avcodec/iff: Check that video_size is large enough for the read parameters
authorMichael Niedermayer <michael@niedermayer.cc>
Sat, 30 Nov 2019 11:22:25 +0000 (12:22 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 28 Dec 2019 10:20:48 +0000 (11:20 +0100)
commitf1b97f62f86d5dca35d01d7a5ebbc5dca2a88ae6
treeb293bfdb92487623284cae2f71f13abdceb0c209
parentfc3760a66dc7622e1b507e322e63411bd8c13369
avcodec/iff: Check that video_size is large enough for the read parameters

video is allocated before parameters like bpp are read.

Fixes: out of array access
Fixes: 19084/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5718556033679360
Fixes: 19465/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5759908398235648

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