[FFmpeg-cvslog] lavfi/histeq: fix out of array write

Paul B Mahol git at videolan.org
Wed Apr 17 02:25:05 CEST 2013


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Apr 17 00:21:17 2013 +0000| [b8edf91657ad9fa2f0c5175c9ca8fbe3c8b0c624] | committer: Paul B Mahol

lavfi/histeq: fix out of array write

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

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

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

diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c
index 7d68be7..33cddaa 100644
--- a/libavfilter/vf_histeq.c
+++ b/libavfilter/vf_histeq.c
@@ -235,7 +235,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpic)
                 dst[x + histeq->rgba_map[R]] = r;
                 dst[x + histeq->rgba_map[G]] = g;
                 dst[x + histeq->rgba_map[B]] = b;
-                oluma = (55 * r + 182 * g + 19 * b) >> 8;
+                oluma = av_clip_uint8((55 * r + 182 * g + 19 * b) >> 8);
                 histeq->out_histogram[oluma]++;
             }
         }



More information about the ffmpeg-cvslog mailing list