mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-02-08 10:50:02 +00:00
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 561cc161ca)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
039c7d21f6
commit
30047c052d
1 changed files with 3 additions and 0 deletions
|
|
@ -403,6 +403,9 @@ static int decode_frame(AVCodecContext *avctx,
|
|||
AVFrame *frame = data;
|
||||
int ret, y, x;
|
||||
|
||||
if (avpkt->size < 8)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
|
||||
return ret;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue