[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 12:09:49 CEST 2008


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Aug 27 11:48:52 2008 +0200| [5f35b662f265027a405cc700f1a06776e380d5d5] | committer: Laurent Aimar 

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=5f35b662f265027a405cc700f1a06776e380d5d5
---

 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