diff --git a/libavcodec/fmvc.c b/libavcodec/fmvc.c index 5778d7b53f..5bee96a18d 100644 --- a/libavcodec/fmvc.c +++ b/libavcodec/fmvc.c @@ -402,6 +402,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, 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;