From 4610d183056f5589caee043f598676ffdc1b68ea Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 26 Jan 2011 10:00:28 -0500 Subject: [PATCH] Should avoid running log2Amp on uninitialized data --- libcelt/quant_bands.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcelt/quant_bands.c b/libcelt/quant_bands.c index 09785ebb..8a9fe8e1 100644 --- a/libcelt/quant_bands.c +++ b/libcelt/quant_bands.c @@ -545,12 +545,16 @@ void log2Amp(const CELTMode *m, int start, int end, const int C = CHANNELS(_C); c=0; do { - for (i=start;inbEBands;i++) + for (i=0;inbEBands] = 0; + for (;inbEBands] + SHL16((celt_word16)eMeans[i],6); eBands[i+c*m->nbEBands] = PSHR32(celt_exp2(SHL16(lg,11-DB_SHIFT)),4); } + for (;inbEBands;i++) + eBands[i+c*m->nbEBands] = 0; } while (++c < C); }