diff options
author | Limin Wang <lance.lmwang@gmail.com> | 2021-12-25 11:15:40 +0800 |
---|---|---|
committer | Limin Wang <lance.lmwang@gmail.com> | 2022-01-30 13:26:35 +0800 |
commit | c825de87c95ac4c70b9495268fcd26bd10dd0027 (patch) | |
tree | 9792d4f9930f379ce787f374cca8eb36c7fd1410 /libavformat/rtpdec_h261.c | |
parent | d9f05bea5cc7a8c4bb0569eecbe24a26def7f476 (diff) | |
download | ffmpeg-c825de87c95ac4c70b9495268fcd26bd10dd0027.tar.gz |
avformat/rtpdec: return value check for init_get_bits()
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
Diffstat (limited to 'libavformat/rtpdec_h261.c')
-rw-r--r-- | libavformat/rtpdec_h261.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/rtpdec_h261.c b/libavformat/rtpdec_h261.c index a102909c60..57bc10fb3d 100644 --- a/libavformat/rtpdec_h261.c +++ b/libavformat/rtpdec_h261.c @@ -119,7 +119,9 @@ static int h261_handle_packet(AVFormatContext *ctx, PayloadContext *rtp_h261_ctx } else { /* ebit/sbit values inconsistent, assuming packet loss */ GetBitContext gb; - init_get_bits(&gb, buf, len*8 - ebit); + res = init_get_bits(&gb, buf, len*8 - ebit); + if (res < 0) + return res; skip_bits(&gb, sbit); if (rtp_h261_ctx->endbyte_bits) { rtp_h261_ctx->endbyte |= get_bits(&gb, 8 - rtp_h261_ctx->endbyte_bits); |