summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 1e706448c1..3d8906bffe 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -837,6 +837,9 @@ static int decode_frame(AVCodecContext *avctx, void *data,
av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n",
id, avctx->frame_number);
+ if (f->version <= 1)
+ return AVERROR_INVALIDDATA;
+
cfrm->size = cfrm->id = 0;
frame_4cc = AV_RL32("pfrm");
} else