Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions decoder/ih264d_parse_cabac.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ UWORD8 ih264d_read_coeff4x4_cabac(dec_bit_stream_t *ps_bitstrm,

ps_tu_4x4 = (tu_sblk4x4_coeff_data_t *)ps_dec->pv_parse_tu_coeff_data;
ps_tu_4x4->u2_sig_coeff_map = 0;

/* Safety: Ensure offset is within permissible bounds */
if (EXCEED_OFFSET(ps_bitstrm))
return 0;
pi2_coeff_data = &ps_tu_4x4->ai2_level[0];

u4_offset = ps_bitstrm->u4_ofst;
Expand Down Expand Up @@ -132,6 +136,10 @@ UWORD8 ih264d_read_coeff4x4_cabac(dec_bit_stream_t *ps_bitstrm,

}

/* Safety: Check before further processing */
if (EXCEED_OFFSET(ps_bitstrm))
return 0;

if(u4_coded_flag)
{

Expand Down