From c0fe405d2a190c5eb7e613b65c54a49ef603c025 Mon Sep 17 00:00:00 2001 From: Ilkka Ollakka Date: Mon, 29 Dec 2008 21:38:51 +0200 Subject: [PATCH] check scheme part in uri with checking :// instead of just checking : should fix #2218, thou getURI should return valid uri anyway. So this is kinda hack anyway. --- modules/misc/playlist/xspf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c index 946d1413b6..a40ba3a4e7 100644 --- a/modules/misc/playlist/xspf.c +++ b/modules/misc/playlist/xspf.c @@ -316,9 +316,9 @@ static char *assertUTF8URI( char *psz_name ) return NULL; /** \todo check for a valid scheme part preceding the colon */ - size_t i_delim = strcspn( psz_s, ":" ); - if( i_delim != strlen( psz_s ) ) + if( strstr( psz_s, "://") != NULL ) { + size_t i_delim = strcspn( psz_s, ":" ); i_delim++; /* skip the ':' */ strncpy( psz_ret, psz_s, i_delim ); psz_d = psz_ret + i_delim; -- 2.20.1