]> git.sesse.net Git - vlc/commitdiff
XSPF: fix NULL dereference on empty <location>
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 2 Mar 2010 19:30:08 +0000 (21:30 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 2 Mar 2010 19:30:08 +0000 (21:30 +0200)
modules/demux/playlist/xspf.c

index c24e0dab6120fa90254111b8ed570b24d2040ab7..278ad103efd04e693f4ba913f54f2b5e8260f942 100644 (file)
@@ -538,6 +538,9 @@ static bool parse_track_node COMPLEX_INTERFACE
                 /* special case: location */
                 if( !strcmp( p_handler->name, "location" ) )
                 {
+                    if( psz_value == NULL )
+                        input_item_SetURI( p_new_input, "vlc://nop" );
+                    else
                     /* FIXME: This is broken. Scheme-relative (//...) locations
                      * and anchors (#...) are not resolved correctly. Also,
                      * host-relative (/...) and directory-relative locations