[FFmpeg-cvslog] avcodec/ffv1dec: check global header version
Michael Niedermayer
git at videolan.org
Fri Aug 30 05:29:13 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Aug 30 03:43:49 2013 +0200| [20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4] | committer: Michael Niedermayer
avcodec/ffv1dec: check global header version
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20b965a1a43ae88b7ae95635d5a3570e7dc2bbd4
---
libavcodec/ffv1dec.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 658c717..76cbee7 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);
More information about the ffmpeg-cvslog
mailing list