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

Cheng Sun git at videolan.org
Mon Jan 2 17:20:03 CET 2012


vlc/vlc-1.2 | branch: master | Cheng Sun <chengsun9 at gmail.com> | Sun Jan  1 23:26:31 2012 +0000| [5a7868fa2e69bca0446f16e119624010e60d50c3] | 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>
(cherry picked from commit 29a5f1324f8979f199125958d7f2821750b5f78f)

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

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

 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