History

avcodec/notchlc: Check init_get_bits8() for failure

Fixes: CID1500300 Unchecked return value

Michael Niedermayer committed 2 years ago

Commit 19db9631 parent 161d0aa1 file · +3 −1Browse files

Unified · Split

libavcodec/notchlc.c+3−1
@@ -243,7 +243,9 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame *p, · 242 unmodified lines
243 243
244 bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET);244 bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET);
245 245
246 init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb));246 ret = init_get_bits8(&bit, dgb.buffer, bytestream2_get_bytes_left(&dgb));
247 if (ret < 0)
248 return ret;
247 for (int x = 0; x < avctx->width; x += 4) {249 for (int x = 0; x < avctx->width; x += 4) {
248 unsigned item = bytestream2_get_le32(gb);250 unsigned item = bytestream2_get_le32(gb);
249 unsigned y_min = item & 4095;251 unsigned y_min = item & 4095;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t