diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-06 16:58:57 +0200 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2013-06-30 16:25:06 +0200 |
commit | e5679444fd60d0b5a32ad4233e65d3a85300a952 (patch) | |
tree | d04e7d873bd32d565bc83e556ea559403f5ffa29 | |
parent | 284ac9191b755ffce1475687b597a8a738d511c6 (diff) | |
download | ffmpeg-e5679444fd60d0b5a32ad4233e65d3a85300a952.tar.gz |
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
-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 735cfcf73a..842e787baa 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -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 |