mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-08-15 15:22:36 +07:00
Merge "Check for buffer overflow in pps/slice header parsing" into lmp-dev
This commit is contained in:
commit
1853d3871a
2 changed files with 6 additions and 0 deletions
|
|
@ -1941,6 +1941,9 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
/* Not present in HM */
|
||||
BITS_PARSE("pps_extension_flag", value, ps_bitstrm, 1);
|
||||
|
||||
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
|
||||
ps_codec->i4_pps_done = 1;
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -859,6 +859,9 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
|
||||
ihevcd_bits_flush_to_byte_boundary(ps_bitstrm);
|
||||
|
||||
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
|
||||
{
|
||||
dpb_mgr_t *ps_dpb_mgr = (dpb_mgr_t *)ps_codec->pv_dpb_mgr;
|
||||
WORD32 r_idx;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue