Fix for OOB write in equalizer instructions parsing.

Bound check was missing for eq_ch_group_count. Added
as fix.

Bug: 117216549
Test: vendor
Change-Id: Ie36446a3604ae1cb2471dad0a938a96f2b7fff64
This commit is contained in:
Ramesh Katuri 2018-10-05 18:00:42 +05:30 committed by Ray Essick
parent c992830e35
commit c9ecca9cd8

View file

@ -1170,6 +1170,9 @@ WORD32 impd_parse_eq_instructions(
}
}
if (str_eq_instructions->eq_ch_group_count > EQ_CHANNEL_GROUP_COUNT_MAX)
return (UNEXPECTED_ERROR);
str_eq_instructions->td_filter_cascade_present =
impd_read_bits_buf(it_bit_buff, 1);
if (it_bit_buff->error) return it_bit_buff->error;