diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-06 16:58:57 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-06-12 14:45:46 +0200 |
commit | 145023f57262d21474e35b4a6069cf95136339d4 (patch) | |
tree | 3b190ff35727c6d269e7831756fab652f8fe5fb2 | |
parent | 1f0c6075604c271d5627480f1243d22795f9a315 (diff) | |
download | ffmpeg-145023f57262d21474e35b4a6069cf95136339d4.tar.gz |
4xm: reject frames not compatible with the declared version
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
-rw-r--r-- | libavcodec/4xm.c | 3 |
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 |