[FFmpeg-cvslog] avcodec/ffv1dec: check global header version

Michael Niedermayer git at videolan.org
Thu Oct 3 01:26:55 CEST 2013


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 30 03:43:49 2013 +0200| [9902eef0f5314b112938de6c32daaa7771daeb57] | committer: Michael Niedermayer

avcodec/ffv1dec: check global header version

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9902eef0f5314b112938de6c32daaa7771daeb57
---

 libavcodec/ffv1dec.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index cb72203..60bbbd0 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -446,6 +446,10 @@ static int read_extra_header(FFV1Context *f)
     ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);
 
     f->version = get_symbol(c, state, 0);
+    if (f->version < 2) {
+        av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n");
+        return AVERROR_INVALIDDATA;
+    }
     if (f->version > 2) {
         c->bytestream_end -= 4;
         f->minor_version = get_symbol(c, state, 0);



More information about the ffmpeg-cvslog mailing list