diff options
author | Jun Zhao <barryjzhao@tencent.com> | 2019-11-28 19:42:01 +0800 |
---|---|---|
committer | Jun Zhao <barryjzhao@tencent.com> | 2019-11-29 10:10:52 +0800 |
commit | 2952d9c5dce4014716ed9693f01447254bf42ee3 (patch) | |
tree | 492eb66962af960d4a9734b9ea7ae5d4817951ec /libavcodec/mvha.c | |
parent | d96558902277a25e002ad1b9bb9bc7e536a13a8b (diff) | |
download | ffmpeg-2952d9c5dce4014716ed9693f01447254bf42ee3.tar.gz |
lavc/mvha: Check init_get_bits8() for failure
fix potential null pointer dereference
Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavcodec/mvha.c')
-rw-r--r-- | libavcodec/mvha.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/mvha.c b/libavcodec/mvha.c index 636b5e69d5..4b03a79283 100644 --- a/libavcodec/mvha.c +++ b/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); |