Merge "Decoder: Updated error check while parsing num_ref_idx_lx_active." into mnc-dev

am: 224824ba17

Change-Id: Id5366922a8312c3fc99f5dc42c64e4bfdf11795b
This commit is contained in:
Marco Nelissen 2017-09-13 05:51:32 +00:00 committed by android-build-merger
commit 628056c0ed
2 changed files with 3 additions and 2 deletions

View file

@ -1399,7 +1399,8 @@ WORD32 ih264d_parse_bslice(dec_struct_t * ps_dec, UWORD16 u2_first_mb_in_slice)
{
u1_max_ref_idx = MAX_FRAMES << 1;
}
if((u4_temp > u1_max_ref_idx) || (ui_temp1 > u1_max_ref_idx))
if((u4_temp > u1_max_ref_idx) || (ui_temp1 > u1_max_ref_idx)
|| (u4_temp < 1) || (ui_temp1 < 1))
{
return ERROR_NUM_REF;
}

View file

@ -1961,7 +1961,7 @@ WORD32 ih264d_parse_pslice(dec_struct_t *ps_dec, UWORD16 u2_first_mb_in_slice)
UWORD8 u1_max_ref_idx = MAX_FRAMES << u1_field_pic_flag;
if(u4_temp > u1_max_ref_idx)
if(u4_temp > u1_max_ref_idx || u4_temp < 1)
{
return ERROR_NUM_REF;
}