[vlc-devel] commit: check scheme part in uri with checking :// instead of just checking : (Ilkka Ollakka )

git version control git at videolan.org
Mon Dec 29 21:13:28 CET 2008


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Mon Dec 29 21:38:51 2008 +0200| [c0fe405d2a190c5eb7e613b65c54a49ef603c025] | committer: Ilkka Ollakka 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c0fe405d2a190c5eb7e613b65c54a49ef603c025
---

 modules/misc/playlist/xspf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/misc/playlist/xspf.c b/modules/misc/playlist/xspf.c
index 946d141..a40ba3a 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;




More information about the vlc-devel mailing list