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

Marek Beleščiak git at videolan.org
Tue Mar 12 07:32:49 CET 2019


vlc/vlc-3.0 | branch: master | Marek Beleščiak <marek.belesciak at lunar.sk> | Wed Jan 30 02:16:19 2019 +0100| [e538831f485f5cd70d77a1cdf8c61105037905ff] | 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>
(cherry picked from commit 3a95f933a548cbb86e690ad57e8127a64c0de1f6)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 9be1b08823..a0d74a232d 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -287,7 +287,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