[vlc-commits] ball: zero-initialize video_format_t to prevent crash with packed chroma.

Cheng Sun git at videolan.org
Mon Jan 2 01:26:08 CET 2012


vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sun Jan  1 23:26:31 2012 +0000| [29a5f1324f8979f199125958d7f2821750b5f78f] | committer: Jean-Baptiste Kempf

ball: zero-initialize video_format_t to prevent crash with packed chroma.

The ball filter requires that fmt_comp.video.p_palette is NULL, otherwise
image_HandlerDelete tries to free it.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_filter/ball.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/modules/video_filter/ball.c b/modules/video_filter/ball.c
index 33c87b0..cd34166 100644
--- a/modules/video_filter/ball.c
+++ b/modules/video_filter/ball.c
@@ -548,6 +548,7 @@ static void FilterBall( filter_t *p_filter, picture_t *p_inpic,
 
     picture_t *p_converted;
     video_format_t fmt_comp;
+    memset( &fmt_comp, 0, sizeof(fmt_comp) );
 
     switch( p_filter->fmt_in.video.i_chroma )
     {



More information about the vlc-commits mailing list