avcodec/ffv1dec: check global header version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
259292f9d4
commit
20b965a1a4
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user