History

avcodec/mpeg12dec: use init_get_bits8 and check the return value

Thierry Foucu committed 3 years ago

Commit efbe84e1 parent 99bd2db1 file · +3 −1Browse files

Unified · Split

libavcodec/mpeg12dec.c+3−1
@@ -2550,7 +2550,9 @@ static int decode_chunks(AVCodecContext *avctx, AVFrame *picture, · 2549 unmodified lines
2550 }2550 }
2551 break;2551 break;
2552 case EXT_START_CODE:2552 case EXT_START_CODE:
2553 init_get_bits(&s2->gb, buf_ptr, input_size * 8);2553 ret = init_get_bits8(&s2->gb, buf_ptr, input_size);
2554 if (ret < 0)
2555 return ret;
2554 2556
2555 switch (get_bits(&s2->gb, 4)) {2557 switch (get_bits(&s2->gb, 4)) {
2556 case 0x1:2558 case 0x1:

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