avcodec/vc1: check return value of bitplane_decoding()
authorPaul B Mahol <onemda@gmail.com>
Sun, 22 Apr 2018 22:05:20 +0000 (00:05 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 23 Apr 2018 21:49:56 +0000 (23:49 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavcodec/vc1.c

index e762507..bf4024c 100644 (file)
@@ -1055,6 +1055,8 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
                     v->last_use_ic = 1;
                 }
                 status = bitplane_decoding(v->s.mbskip_table, &v->skip_is_raw, v);
+                if (status < 0)
+                    return -1;
                 av_log(v->s.avctx, AV_LOG_DEBUG, "SKIPMB plane encoding: "
                        "Imode: %i, Invert: %i\n", status>>1, status&1);
                 v->mbmodetab = get_bits(gb, 2);