Commit 20b965a1 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec/ffv1dec: check global header version

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 259292f9
...@@ -483,6 +483,10 @@ static int read_extra_header(FFV1Context *f) ...@@ -483,6 +483,10 @@ static int read_extra_header(FFV1Context *f)
ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8); ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);
f->version = get_symbol(c, state, 0); 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) { if (f->version > 2) {
c->bytestream_end -= 4; c->bytestream_end -= 4;
f->micro_version = get_symbol(c, state, 0); f->micro_version = get_symbol(c, state, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment