aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-06-06 16:58:57 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-06-16 15:54:06 +0200
commitded74ab5d1ccfef375090a0e828fa123c589083c (patch)
treec5e045711398c0021c05a34bad53a07596e23a6d /libavcodec
parentf82e9deec2c2657d73731ab16c49efba5559670d (diff)
downloadffmpeg-ded74ab5d1ccfef375090a0e828fa123c589083c.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>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/4xm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 4973b41636..dbf49177e6 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -835,6 +835,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