diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-04-15 10:45:02 +0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-04-15 10:53:09 +0400 |
commit | c37834b27e43cdd3146ffa8d2a67a09d5ce79abe (patch) | |
tree | 9d36993dfef07222a3a40571f938133339fdac75 | |
parent | 2fb4f5c43940d2b29b73d847ce8f8cf1b992896a (diff) |
Fixes a minor bug found by valgrind in the bandwidth detector
The energy calculation from the packed FFTs ended up reading out-of-bound
memory for frequency zero. The bug was exposed by c5e04e4.
-rw-r--r-- | src/analysis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/analysis.c b/src/analysis.c index 734364b9..e4156d6d 100644 --- a/src/analysis.c +++ b/src/analysis.c @@ -101,7 +101,7 @@ static const int tbands[NB_TBANDS+1] = { }; static const int extra_bands[NB_TOT_BANDS+1] = { - 0, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200 + 1, 2, 4, 6, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, 68, 80, 96, 120, 160, 200 }; /*static const float tweight[NB_TBANDS+1] = { |