From daba369471376953ee558dabe100d5eca0d89b02 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Mon, 23 Apr 2018 00:05:20 +0200 Subject: [PATCH] avcodec/vc1: check return value of bitplane_decoding() Signed-off-by: Paul B Mahol --- libavcodec/vc1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c index e7625070f7..bf4024cb5a 100644 --- a/libavcodec/vc1.c +++ b/libavcodec/vc1.c @@ -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);