aacdec: fix temporary array size
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Nov 2012 19:33:01 +0000 (20:33 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 9 Nov 2012 20:05:43 +0000 (21:05 +0100)
Avoids out of array accesses.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/aacdec.c

index b132cba..10132bb 100644 (file)
@@ -2035,7 +2035,7 @@ static void apply_tns(float coef[1024], TemporalNoiseShaping *tns,
     int w, filt, m, i;
     int bottom, top, order, start, end, size, inc;
     float lpc[TNS_MAX_ORDER];
-    float tmp[TNS_MAX_ORDER];
+    float tmp[TNS_MAX_ORDER+1];
 
     for (w = 0; w < ics->num_windows; w++) {
         bottom = ics->num_swb;