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:
James Almer
2025-12-11 20:01:01 -03:00
parent e54bd7065d
commit 04df80f973
+2 -1
View File
@@ -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: