Add bounds check for tile dimensions

Bug: 129976164
Bug: 130024844
Test: vendor/poc
Change-Id: I1e54babaec9c5ad199b60c7cfc1e24e36422f630
This commit is contained in:
Harish Mahendrakar 2019-04-05 12:54:40 -07:00 committed by Ray Essick
parent 89937f03cd
commit 05f83e9458

View file

@ -1908,6 +1908,10 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
{
UEV_PARSE("column_width_minus1[ i ]", value, ps_bitstrm);
value += 1;
if (value >= ps_sps->i2_pic_wd_in_ctb - start)
{
return IHEVCD_INVALID_HEADER;
}
}
else
{
@ -1944,6 +1948,10 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
UEV_PARSE("row_height_minus1[ i ]", value, ps_bitstrm);
value += 1;
if (value >= ps_sps->i2_pic_ht_in_ctb - start)
{
return IHEVCD_INVALID_HEADER;
}
}
else
{