[vlc-devel] commit: Fixed a potential crash due to a mix up between pitch and pixel pitch in blend .c. (Laurent Aimar )

git version control git at videolan.org
Wed Aug 27 18:33:42 CEST 2008


vlc | branch: 0.9-bugfix | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27 11:48:52 2008 +0200| [eb928d42fb3b1b767c6cc3199328652327acf120] | committer: Jean-Baptiste Kempf 

Fixed a potential crash due to a mix up between pitch and pixel pitch in blend.c.

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

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

diff --git a/modules/video_filter/blend.c b/modules/video_filter/blend.c
index fa118d0..104cc1e 100644
--- a/modules/video_filter/blend.c
+++ b/modules/video_filter/blend.c
@@ -1359,7 +1359,7 @@ static void BlendRGBAI420( filter_t *p_filter, picture_t *p_dst,
     i_src_pix_pitch = p_src->p->i_pixel_pitch;
     i_src2_pitch = p_src->p->i_pitch;
     p_src2 = p_src->p->p_pixels +
-             p_filter->fmt_in.video.i_x_offset * i_src2_pitch +
+             p_filter->fmt_in.video.i_x_offset * i_src_pix_pitch +
              p_src->p->i_pitch * p_filter->fmt_in.video.i_y_offset;
 
 
@@ -1424,7 +1424,7 @@ static void BlendRGBAR24( filter_t *p_filter, picture_t *p_dst_pic,
     i_src_pix_pitch = p_src->p->i_pixel_pitch;
     i_src2_pitch = p_src->p->i_pitch;
     p_src2 = p_src->p->p_pixels +
-             p_filter->fmt_in.video.i_x_offset * i_pix_pitch +
+             p_filter->fmt_in.video.i_x_offset * i_src_pix_pitch +
              p_src->p->i_pitch * p_filter->fmt_in.video.i_y_offset;
 
     vlc_rgb_index( &i_rindex, &i_gindex, &i_bindex, &p_filter->fmt_out.video );
@@ -1477,7 +1477,7 @@ static void BlendRGBAR16( filter_t *p_filter, picture_t *p_dst_pic,
     i_src_pix_pitch = p_src->p->i_pixel_pitch;
     i_src2_pitch = p_src->p->i_pitch;
     p_src2 = p_src->p->p_pixels +
-             p_filter->fmt_in.video.i_x_offset * i_pix_pitch +
+             p_filter->fmt_in.video.i_x_offset * i_src_pix_pitch +
              p_src->p->i_pitch * p_filter->fmt_in.video.i_y_offset;
 
     /* Draw until we reach the bottom of the subtitle */




More information about the vlc-devel mailing list