[vlc-commits] Fixed out of bound writes in grain filter for non mod 8 video.

Laurent Aimar git at videolan.org
Thu Jan 12 22:27:02 CET 2012


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jan 12 22:14:55 2012 +0100| [8473f0753678b6ddf507a0cd9f6043704464b0e7] | committer: Laurent Aimar

Fixed out of bound writes in grain filter for non mod 8 video.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8473f0753678b6ddf507a0cd9f6043704464b0e7
---

 modules/video_filter/grain.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/modules/video_filter/grain.c b/modules/video_filter/grain.c
index a180ae3..c447876 100644
--- a/modules/video_filter/grain.c
+++ b/modules/video_filter/grain.c
@@ -241,7 +241,8 @@ static void PlaneFilter(filter_t *filter,
             if (w >= BLEND_SIZE && h >= BLEND_SIZE)
                 sys->blend(dstp, dst->i_pitch, srcp, src->i_pitch, noise);
             else
-                BlockBlend(dstp, dst->i_pitch, srcp, src->i_pitch, noise, w, h);
+                BlockBlend(dstp, dst->i_pitch, srcp, src->i_pitch, noise,
+                           __MIN(w, BLEND_SIZE), __MIN(h, BLEND_SIZE));
         }
     }
     if (sys->emms)



More information about the vlc-commits mailing list