Browse code

avcodec/ffv1dec: More completely check micro_version

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/05/04 20:33:16
Showing 1 changed files
... ...
@@ -528,6 +528,8 @@ static int read_extra_header(FFV1Context *f)
528 528
     if (f->version > 2) {
529 529
         c->bytestream_end -= 4;
530 530
         f->micro_version = get_symbol(c, state, 0);
531
+        if (f->micro_version < 0)
532
+            return AVERROR_INVALIDDATA;
531 533
     }
532 534
     f->ac = f->avctx->coder_type = get_symbol(c, state, 0);
533 535
     if (f->ac > 1) {