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

This commit is contained in:
Ray Essick 2018-10-30 22:12:07 +00:00 committed by Android (Google) Code Review
commit 6511706b0b

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) &&