[vlc-devel] commit: XSPF: remove harmful base decoding ( Rémi Denis-Courmont )
git version control
git at videolan.org
Tue Jun 23 21:37:43 CEST 2009
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Jun 23 22:37:30 2009 +0300| [993d4fcc4a511fc1b5d3bc3cafb262dd20e5cf40] | committer: Rémi Denis-Courmont
XSPF: remove harmful base decoding
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=993d4fcc4a511fc1b5d3bc3cafb262dd20e5cf40
---
modules/demux/playlist/xspf.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/modules/demux/playlist/xspf.c b/modules/demux/playlist/xspf.c
index 48ad5dd..f6eb165 100644
--- a/modules/demux/playlist/xspf.c
+++ b/modules/demux/playlist/xspf.c
@@ -210,7 +210,7 @@ static bool parse_playlist_node COMPLEX_INTERFACE
;
else if( !strcmp( psz_name, "xml:base" ) )
{
- p_demux->p_sys->psz_base = decode_URI_duplicate( psz_value );
+ p_demux->p_sys->psz_base = strdup( psz_value );
}
/* unknown attribute */
else
@@ -546,6 +546,13 @@ static bool parse_track_node COMPLEX_INTERFACE
/* special case: location */
if( !strcmp( p_handler->name, "location" ) )
{
+ /* FIXME: This is broken. Scheme-relative (//...) locations
+ * and anchors (#...) are not resolved correctly. Also,
+ * host-relative (/...) and directory-relative locations
+ * ("relative path" in vernacular) should be resolved.
+ * Last, psz_base should default to the XSPF resource
+ * location if missing (not the current working directory).
+ * -- Courmisch */
if( p_demux->p_sys->psz_base && !strstr( psz_value, "://" ) )
{
char* psz_tmp;
More information about the vlc-devel
mailing list