1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

avcodec/leaddec: Check init_get_bits8() for failure

Fixes: CID1604416 Unchecked return value

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0e3e7e8aeb4448a355979ddec87b0e1676ca9f15)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-07-05 02:21:50 +02:00
parent 4da9443735
commit 31bc90cd2f
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -196,7 +196,9 @@ static int lead_decode_frame(AVCodecContext *avctx, AVFrame * frame,
i++;
}
init_get_bits8(&gb, s->bitstream_buf, size);
ret = init_get_bits8(&gb, s->bitstream_buf, size);
if (ret < 0)
return ret;
if (avctx->pix_fmt == AV_PIX_FMT_YUV420P && zero) {
for (int mb_y = 0; mb_y < avctx->height / 8; mb_y++)