avcodec/cavs_parser: check return value of init_get_bits8
Fixes Coverity issue CID 1676035 Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -142,7 +142,8 @@ static int cavs_parse_frame(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
return 0;
|
||||
switch (stc) {
|
||||
case CAVS_START_CODE:
|
||||
init_get_bits8(&gb, buf_ptr, buf_end - buf_ptr);
|
||||
if (init_get_bits8(&gb, buf_ptr, buf_end - buf_ptr) < 0)
|
||||
return 0;
|
||||
parse_seq_header(s, avctx, &gb);
|
||||
break;
|
||||
case PIC_I_START_CODE:
|
||||
|
||||
Reference in New Issue
Block a user