diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c index 74e9bdd8a0..9bbe8c6ccf 100644 --- a/libavcodec/fmvc.c +++ b/libavcodec/fmvc.c @@ -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;