Changeset 21aa24f666b07c375fdf9cd15d3783c55a329374

Show
Ignore:
Timestamp:
21/10/07 14:56:41 (1 year ago)
Author:
Rafaël Carré <funman@videolan.org>
git-committer:
Rafaël Carré <funman@videolan.org> 1192971401 +0000
git-parent:

[54f91faac813fba2cb8b94fdc11ee977a9a94c66]

git-author:
Rafaël Carré <funman@videolan.org> 1192971401 +0000
Message:

xspf demuxer: correctly checks "application" attribute of <extension> tag, fix #1342

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/playlist/xspf.c

    rec187ec r21aa24f  
    653653    char *psz_value = NULL; 
    654654    char *psz_title = NULL; 
     655    char *psz_application = NULL; 
    655656    int i_node; 
    656657    xml_elem_hnd_t *p_handler = NULL; 
     
    678679            psz_title = unescape_URI_duplicate( psz_value ); 
    679680        } 
     681        /* extension attribute: application */ 
     682        if( !strcmp( psz_name, "application" ) ) 
     683        { 
     684            psz_application = strdup( psz_value ); 
     685        } 
    680686        /* unknown attribute */ 
    681687        else 
    682             msg_Warn( p_demux, "invalid <node> attribute:\"%s\"", psz_name); 
     688            msg_Warn( p_demux, "invalid <%s> attribute:\"%s\"", psz_element, psz_name ); 
    683689 
    684690        FREE_ATT(); 
     
    691697        return VLC_FALSE; 
    692698    } 
    693     if( psz_title ) free( psz_title ); 
     699    free( psz_title ); 
     700 
     701    if( !strcmp( psz_element, "extension" ) ) 
     702    { 
     703        if( !psz_application ) 
     704        { 
     705            msg_Warn( p_demux, "<extension> requires \"application\" attribute" ); 
     706            return VLC_FALSE; 
     707        } 
     708        else if( strcmp( psz_application, "http://www.videolan.org/vlc/playlist/0" ) ) 
     709        { 
     710            msg_Dbg( p_demux, "Skipping \"%s\" extension tag", psz_application ); 
     711            free( psz_application ); 
     712            return VLC_FALSE; 
     713        } 
     714    } 
     715    free( psz_application ); 
    694716 
    695717    /* parse the child elements */