diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-30 03:43:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-08-30 03:43:49 +0200 |
commit | 20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4 (patch) | |
tree | 11d78c4a5fdaf8ef71f6ea6251f5d5259a0ad7a2 /libavcodec | |
parent | 259292f9d484f31812a6ecbf4bfd3efd7c5905fd (diff) | |
download | ffmpeg-20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4.tar.gz |
avcodec/ffv1dec: check global header version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ffv1dec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 658c71745f..76cbee7f23 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -483,6 +483,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->micro_version = get_symbol(c, state, 0); |