avcodec/ffv1dec: check global header version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/37/head
Michael Niedermayer 12 years ago
parent 259292f9d4
commit 20b965a1a4
  1. 4
      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);

Loading…
Cancel
Save