mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
lavc/midivid: check return value of init_get_bits8()
Fix CID 1456088 Signed-off-by: Zhong Li <zhongli_dev@126.com>
This commit is contained in:
parent
94ad5d0128
commit
5dc527f9ca
@ -63,7 +63,7 @@ static int decode_mvdv(MidiVidContext *s, AVCodecContext *avctx, AVFrame *frame)
|
||||
if (intra_flag) {
|
||||
nb_blocks = (avctx->width / 2) * (avctx->height / 2);
|
||||
} else {
|
||||
int skip_linesize;
|
||||
int ret, skip_linesize;
|
||||
|
||||
nb_blocks = bytestream2_get_le32(gb);
|
||||
skip_linesize = avctx->width >> 1;
|
||||
@ -73,7 +73,9 @@ static int decode_mvdv(MidiVidContext *s, AVCodecContext *avctx, AVFrame *frame)
|
||||
if (bytestream2_get_bytes_left(gb) < mask_size)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
init_get_bits8(&mask, mask_start, mask_size);
|
||||
ret = init_get_bits8(&mask, mask_start, mask_size);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
bytestream2_skip(gb, mask_size);
|
||||
skip = s->skip;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user