avfilter/vf_colorbalance: fix off by one overflow
authorPaul B Mahol <onemda@gmail.com>
Sat, 5 May 2018 14:11:35 +0000 (16:11 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sat, 5 May 2018 15:37:50 +0000 (17:37 +0200)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vf_colorbalance.c

index 4e7476a..dd8189f 100644 (file)
@@ -291,7 +291,7 @@ static int config_output(AVFilterLink *outlink)
 
         shadows[i] = low;
         midtones[i] = mid;
-        highlights[max - i] = low;
+        highlights[max - i - 1] = low;
     }
 
     for (i = 0; i < max; i++) {