mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 15:22:36 +07:00
Fix heap buffer overflow while searching for valid PPS
Bug: 37094889 Test: Tested POC on ASAN build Change-Id: Id4e52cd10a4d5eac015efe4b752162dc39cc30b8
This commit is contained in:
parent
1853d3871a
commit
5204651228
1 changed files with 4 additions and 3 deletions
|
|
@ -257,10 +257,11 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
{
|
||||
pps_t *ps_pps_ref = ps_codec->ps_pps_base;
|
||||
while(0 == ps_pps_ref->i1_pps_valid)
|
||||
{
|
||||
ps_pps_ref++;
|
||||
|
||||
if((ps_pps_ref - ps_codec->ps_pps_base >= MAX_PPS_CNT - 1))
|
||||
return IHEVCD_INVALID_HEADER;
|
||||
if((ps_pps_ref - ps_codec->ps_pps_base >= MAX_PPS_CNT - 1))
|
||||
return IHEVCD_INVALID_HEADER;
|
||||
}
|
||||
|
||||
ihevcd_copy_pps(ps_codec, pps_id, ps_pps_ref->i1_pps_id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue