Merge "Fix for array out of bound in decoder/drc_src/impd_drc_eq.c" into rvc-dev
This commit is contained in:
commit
7862de4bd2
1 changed files with 5 additions and 3 deletions
|
|
@ -1223,9 +1223,10 @@ WORD32 impd_parse_eq_instructions(
|
||||||
if (it_bit_buff->error) return it_bit_buff->error;
|
if (it_bit_buff->error) return it_bit_buff->error;
|
||||||
|
|
||||||
if (str_eq_instructions->td_filter_cascade_present) {
|
if (str_eq_instructions->td_filter_cascade_present) {
|
||||||
impd_parser_td_filter_cascade(
|
WORD32 err = impd_parser_td_filter_cascade(
|
||||||
it_bit_buff, str_eq_instructions,
|
it_bit_buff, str_eq_instructions,
|
||||||
&(str_eq_instructions->str_td_filter_cascade));
|
&(str_eq_instructions->str_td_filter_cascade));
|
||||||
|
if (err) return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
str_eq_instructions->subband_gains_present =
|
str_eq_instructions->subband_gains_present =
|
||||||
|
|
@ -1234,9 +1235,10 @@ WORD32 impd_parse_eq_instructions(
|
||||||
|
|
||||||
if (str_eq_instructions->subband_gains_present) {
|
if (str_eq_instructions->subband_gains_present) {
|
||||||
for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
|
for (i = 0; i < str_eq_instructions->eq_ch_group_count; i++) {
|
||||||
str_eq_instructions->subband_gains_index[i] =
|
WORD32 tmp = impd_read_bits_buf(it_bit_buff, 6);
|
||||||
impd_read_bits_buf(it_bit_buff, 6);
|
|
||||||
if (it_bit_buff->error) return it_bit_buff->error;
|
if (it_bit_buff->error) return it_bit_buff->error;
|
||||||
|
if (tmp >= UNIQUE_SUBBAND_GAIN_COUNT_MAX) return UNEXPECTED_ERROR;
|
||||||
|
str_eq_instructions->subband_gains_index[i] = tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue