Fixed a segfault in podcast
authorGeoffroy Couprie <geo.couprie@gmail.com>
Tue, 25 Mar 2008 01:31:21 +0000 (02:31 +0100)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Tue, 25 Mar 2008 01:45:16 +0000 (02:45 +0100)
Signed-off-by: Pierre d'Herbemont <pdherbemont@videolan.org>
modules/demux/playlist/podcast.c

index 11db8c4..6f8685f 100644 (file)
@@ -270,6 +270,11 @@ static int Demux( demux_t *p_demux )
                 if( !psz_elname ) return -1;
                 if( !strcmp( psz_elname, "item" ) )
                 {
+                    if( psz_item_mrl == NULL )
+                    {
+                        msg_Err( p_demux, "invalid XML (no enclosure markup)" );
+                        return -1;
+                    }
                     p_input = input_ItemNewExt( p_playlist, psz_item_mrl,
                                                 psz_item_name, 0, NULL, -1 );
                     if( p_input == NULL ) break;