]> git.sesse.net Git - vlc/commitdiff
check scheme part in uri with checking :// instead of just checking :
authorIlkka Ollakka <ileoo@videolan.org>
Mon, 29 Dec 2008 19:38:51 +0000 (21:38 +0200)
committerIlkka Ollakka <ileoo@videolan.org>
Mon, 29 Dec 2008 20:10:27 +0000 (22:10 +0200)
should fix #2218, thou getURI should return valid uri anyway. So this
is kinda hack anyway.

modules/misc/playlist/xspf.c

index 946d1413b6615127f740d7ac771446aa9ef5f85a..a40ba3a4e7b6096b8229288de05282f9a668de04 100644 (file)
@@ -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;