Merge "Fix for heap buffer overflow in tns block" into pi-dev

am: 6511706b0b

Change-Id: I318655b0dd37767307b81b0530e020aaba35715f
This commit is contained in:
Ray Essick 2018-10-30 15:23:40 -07:00 committed by android-build-merger
commit b69f0f116c

View file

@ -354,11 +354,12 @@ VOID ixheaacd_aac_tns_process(
scale_spec = (*ixheaacd_calc_max_spectral_line)(ptr_tmp, size);
}
if (filter->direction != -1) {
position = start;
} else {
if (filter->direction == -1) {
position = stop - 1;
if (((win << 7) + position) < filter->order) continue;
} else {
position = start;
if ((((win << 7) + position) + filter->order) > MAX_BINS_LONG) continue;
}
if ((num_ch <= 2) &&