ref: 3ff5e4c2dc147acee2dc1b9c3bcb2c8d7b76b1f1
parent: f080a151a56c6f4bafbf29366c0b5187a39f8298
author: Jean-Marc Valin <[email protected]>
date: Wed Apr 14 14:02:09 EDT 2010
Making sure compute_allocation_table() doesn't overrun at lower sampling rates
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -208,7 +208,7 @@
high = bark_freq[j+1];
edge = mode->eBands[eband+1]*res;
- while (edge <= high)
+ while (edge <= high && eband < mode->nbEBands)
{
celt_int32 num;
int den, bits;