You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-06-14 22:15:12 +02:00
avcodec/notchlc: Check init_get_bits8() for failure
Fixes: CID1500300 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 19db9636c5
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@ -242,7 +242,9 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame *p,
|
|||||||
|
|
||||||
bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET);
|
bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET);
|
||||||
|
|
||||||
init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb));
|
ret = init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb));
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
for (int x = 0; x < avctx->width; x += 4) {
|
for (int x = 0; x < avctx->width; x += 4) {
|
||||||
unsigned item = bytestream2_get_le32(gb);
|
unsigned item = bytestream2_get_le32(gb);
|
||||||
unsigned y_min = item & 4095;
|
unsigned y_min = item & 4095;
|
||||||
|
Reference in New Issue
Block a user