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

Michael Niedermayer git at videolan.org
Sat Aug 31 04:54:50 CEST 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 30 03:43:49 2013 +0200| [890c36d7ff1a12641c9fe5c84db4398dfb493fc5] | 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=890c36d7ff1a12641c9fe5c84db4398dfb493fc5
---

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

diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index a1da544..69930d8 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -447,6 +447,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