[FFmpeg-cvslog] avfilter/vf_colorbalance: fix off by one overflow

Paul B Mahol git at videolan.org
Sat May 5 18:39:26 EEST 2018


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat May  5 16:11:35 2018 +0200| [2017b4b1c25bd72aaa9098ed4c3c669b9c11c0e0] | committer: Paul B Mahol

avfilter/vf_colorbalance: fix off by one overflow

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2017b4b1c25bd72aaa9098ed4c3c669b9c11c0e0
---

 libavfilter/vf_colorbalance.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c
index 4e7476ae2f..dd8189f548 100644
--- a/libavfilter/vf_colorbalance.c
+++ b/libavfilter/vf_colorbalance.c
@@ -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++) {



More information about the ffmpeg-cvslog mailing list