Decoder: Added an error check while parsing PPS. am: 62f98981ff am: 0f6a1883e8 am: e0e549aad5 am: d9a55dded2

am: d5f3df9c33

Change-Id: I8c2bfdd9bc97e79747b62d62bd28a683d6d9d77f
This commit is contained in:
Hamsalekha S 2017-05-12 21:08:07 +00:00 committed by android-build-merger
commit 4f7fa508be

View file

@ -361,11 +361,13 @@ WORD32 ih264d_parse_pps(dec_struct_t * ps_dec, dec_bit_stream_t * ps_bitstrm)
}
/* read second_chroma_qp_index_offset syntax element */
ps_pps->i1_second_chroma_qp_index_offset = ih264d_sev(
i_temp = ih264d_sev(
pu4_bitstrm_ofst, pu4_bitstrm_buf);
if((ps_pps->i1_second_chroma_qp_index_offset + 12) > 24)
if((i_temp < -12) || (i_temp > 12))
return ERROR_INV_RANGE_QP_T;
ps_pps->i1_second_chroma_qp_index_offset = i_temp;
}
/* In case bitstream read has exceeded the filled size, then