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

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/notchlc.c+3−1
@@ -243,7 +243,9 @@ static int decode_blocks(AVCodecContext *avctx, AVFrame *p, · 242 unmodified lines
243243
244244 bytestream2_seek(&dgb, s->y_data_offset + row_offset, SEEK_SET);
245245
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;
247249 for (int x = 0; x < avctx->width; x += 4) {
248250 unsigned item = bytestream2_get_le32(gb);
249251 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