Merge "Fix for heap buffer over flow in drc bit stream parsing" into pi-dev
am: 8630b598a9
Change-Id: I3940ebbf94f917ebd9e91ae54e4d1b33e4548fdd
This commit is contained in:
commit
f635721bc0
1 changed files with 6 additions and 0 deletions
|
|
@ -587,6 +587,10 @@ WORD32 impd_parse_drc_ext_v1(ia_bit_buf_struct* it_bit_buff,
|
|||
if (str_drc_config_ext->loud_eq_instructions_flag == 1) {
|
||||
str_drc_config_ext->loud_eq_instructions_count =
|
||||
impd_read_bits_buf(it_bit_buff, 4);
|
||||
if (str_drc_config_ext->loud_eq_instructions_count >
|
||||
LOUD_EQ_INSTRUCTIONS_COUNT_MAX)
|
||||
return UNEXPECTED_ERROR;
|
||||
|
||||
if (it_bit_buff->error) return it_bit_buff->error;
|
||||
for (i = 0; i < str_drc_config_ext->loud_eq_instructions_count; i++) {
|
||||
err = impd_parse_loud_eq_instructions(
|
||||
|
|
@ -605,6 +609,8 @@ WORD32 impd_parse_drc_ext_v1(ia_bit_buf_struct* it_bit_buff,
|
|||
if (err) return (err);
|
||||
str_drc_config_ext->eq_instructions_count =
|
||||
impd_read_bits_buf(it_bit_buff, 4);
|
||||
if (str_drc_config_ext->eq_instructions_count > EQ_INSTRUCTIONS_COUNT_MAX)
|
||||
return UNEXPECTED_ERROR;
|
||||
if (it_bit_buff->error) return it_bit_buff->error;
|
||||
for (i = 0; i < str_drc_config_ext->eq_instructions_count; i++) {
|
||||
err = impd_parse_eq_instructions(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue