Merge "Decoder: Fix integer overflow in poc calculation" am: 159799b4d4 am: d7617ea8b9 am: 820dfca937

Original change: 1376336

Change-Id: I2fd667167b676046d2816a483a93641d1784d704
This commit is contained in:
Ray Essick 2020-08-04 21:38:54 +00:00 committed by Automerger Merge Worker
commit e2cf6c5aec

View file

@ -1494,7 +1494,11 @@ WORD32 ih264d_mark_err_slice_skip(dec_struct_t * ps_dec,
ps_dec->p_motion_compensate = ih264d_motion_compensate_bp;
if(ps_dec->ps_cur_pic != NULL)
poc = ps_dec->ps_cur_pic->i4_poc + 2;
{
poc = ps_dec->ps_cur_pic->i4_poc;
if (poc <= INT32_MAX - 2)
poc += 2;
}
j = -1;
for(i = 0; i < MAX_NUM_PIC_PARAMS; i++)