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 am: 5204651228 am: 89e719dc77 am: 22af42db03
am: 8108fecdf7
Change-Id: If4d873c7e01ad27c2e8f2e66525448b909e0ee63
This commit is contained in:
commit
a136624479
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