lavc/mvha: Check init_get_bits8() for failure

fix potential null pointer dereference

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
pull/333/head
Jun Zhao 5 years ago
parent d965589022
commit 2952d9c5dc
  1. 4
      libavcodec/mvha.c

@ -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);

Loading…
Cancel
Save