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

git version control git at videolan.org
Sun Jan 11 17:34:40 CET 2009


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

check scheme part in uri with checking :// instead of just checking :,
thou getURI should return valid uri anyway. So this is kinda hack anyway.

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

 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 be1f699..1f49909 100644
--- a/modules/misc/playlist/xspf.c
+++ b/modules/misc/playlist/xspf.c
@@ -324,9 +324,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