[vlc-commits] substext: fix null dereference

Francois Cartegnie git at videolan.org
Wed Aug 5 01:49:47 CEST 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug  4 21:16:27 2015 +0200| [38fe1f1a24f651ce78522d5c639fe27a5e0dfa57] | committer: Francois Cartegnie

substext: fix null dereference

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

 modules/codec/substext.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/substext.h b/modules/codec/substext.h
index f7aeb2e..2bc6bb4 100644
--- a/modules/codec/substext.h
+++ b/modules/codec/substext.h
@@ -110,6 +110,8 @@ static void SubpictureTextUpdate(subpicture_t *subpic,
         for ( text_segment_t* p_segment = sys->p_segments; p_segment; p_segment = p_segment->p_next )
         {
             text_style_t* p_style = p_segment->style;
+            if(!p_style)
+                continue;
 
             if (sys->i_font_height_abs_to_src)
                 sys->i_font_height_percent = sys->i_font_height_abs_to_src * 100 /



More information about the vlc-commits mailing list