diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-08-30 03:43:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-03 01:04:18 +0200 |
commit | 9902eef0f5314b112938de6c32daaa7771daeb57 (patch) | |
tree | 6eb9cb5c986082fb11e2af4b989c26b658cef1b4 /libavcodec | |
parent | 0a55c882cb6bef5617ea7150c61889272aa08e5e (diff) | |
download | ffmpeg-9902eef0f5314b112938de6c32daaa7771daeb57.tar.gz |
avcodec/ffv1dec: check global header version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4)
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 cb72203468..60bbbd0375 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); |