[vlc-commits] Fix crash when podcast item name is missing

Marek Beleščiak git at videolan.org
Sun Feb 24 10:43:42 CET 2019


vlc | branch: master | Marek Beleščiak <marek.belesciak at lunar.sk> | Wed Jan 30 02:16:19 2019 +0100| [3a95f933a548cbb86e690ad57e8127a64c0de1f6] | committer: Jean-Baptiste Kempf

Fix crash when podcast item name is missing

There is a case when a null pointer may get passed to vlc_xml_decode(),
which causes a null pointer deference. This commit fixes that.

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

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

 modules/demux/playlist/podcast.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/demux/playlist/podcast.c b/modules/demux/playlist/podcast.c
index 49367893f7..3251ad3ce4 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -286,7 +286,8 @@ static int ReadDir( stream_t *p_demux, input_item_node_t *p_subitems )
                     }
 
                     vlc_xml_decode( psz_item_mrl );
-                    vlc_xml_decode( psz_item_name );
+                    if( psz_item_name )
+                       vlc_xml_decode( psz_item_name );
                     p_input = input_item_New( psz_item_mrl, psz_item_name );
                     FREENULL( psz_item_mrl );
                     FREENULL( psz_item_name );



More information about the vlc-commits mailing list