avfilter/af_superequalizer: fix out of array access
authorPaul B Mahol <onemda@gmail.com>
Mon, 19 Jun 2017 16:12:29 +0000 (18:12 +0200)
committerPaul B Mahol <onemda@gmail.com>
Mon, 19 Jun 2017 16:19:16 +0000 (18:19 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/af_superequalizer.c

index 4c9f215..69d29f4 100644 (file)
@@ -126,7 +126,7 @@ static void process_param(float *bc, EqParameter *param, float fs)
 
     for (i = 0; i <= NBANDS; i++) {
         param[i].lower = i == 0 ? 0 : bands[i - 1];
-        param[i].upper = i == NBANDS - 1 ? fs : bands[i];
+        param[i].upper = i == NBANDS ? fs : bands[i];
         param[i].gain  = bc[i];
     }
 }