4xm: reject frames not compatible with the declared version

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 145023f57262d21474e35b4a6069cf95136339d4)

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>

Conflicts:
	libavcodec/4xm.c
This commit is contained in:
Luca Barbato 2013-06-06 16:58:57 +02:00 committed by Reinhard Tartler
parent 284ac9191b
commit e5679444fd

View File

@ -769,6 +769,9 @@ static int decode_frame(AVCodecContext *avctx,
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