Commit 2952d9c5 authored by Jun Zhao's avatar Jun Zhao

lavc/mvha: Check init_get_bits8() for failure

fix potential null pointer dereference
Signed-off-by: 's avatarJun Zhao <barryjzhao@tencent.com>
parent d9655890
......@@ -190,7 +190,9 @@ static int decode_frame(AVCodecContext *avctx,
GetBitContext *gb = &s->gb;
int first_symbol, symbol;
init_get_bits8(gb, avpkt->data + 8, avpkt->size - 8);
ret = init_get_bits8(gb, avpkt->data + 8, avpkt->size - 8);
if (ret < 0)
return ret;
skip_bits(gb, 24);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment