avcodec/fmvc: Check if header fields are available before allocating the image
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 2 Jun 2019 21:16:40 +0000 (23:16 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 27 Jun 2019 15:50:47 +0000 (17:50 +0200)
commita56b96a3dade2552efd13a30d395c135fab7f8cb
tree625556f7e215329980e90c29a2577f6443ce547d
parent6e26b1b0b18df60f77f6c0878438783a8b851f6f
avcodec/fmvc: Check if header fields are available before allocating the image

Fixes: Timeout (15sec -> 0.5sec)
Fixes: 14846/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FMVC_fuzzer-5068322120400896

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>
(cherry picked from commit 561cc161ca617c1b8d48fef0f02d56c0f1af0486)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/fmvc.c