]> git.sesse.net Git - vlc/commitdiff
Cosmetics
authorJP Dinger <jpd@m2x.nl>
Sun, 17 May 2009 17:28:13 +0000 (19:28 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Mon, 18 May 2009 16:48:45 +0000 (19:48 +0300)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
projects/mozilla/vlcplugin.cpp

index 0d137cd225fe38d2558454074c96c3a07d90dbb3..55c15ec1b0cfc110df2c0a4bbd4d99cfefb6637a 100644 (file)
@@ -476,7 +476,7 @@ relativeurl:
             if( href )
             {
                 /* prepend base URL */
-                strcpy(href, psz_baseURL);
+                memcpy(href, psz_baseURL, baseLen+1);
 
                 /*
                 ** relative url could be empty,
@@ -491,7 +491,7 @@ relativeurl:
 
                 /* skip over protocol part  */
                 char *pathstart = strchr(href, ':');
-                char *pathend;
+                char *pathend = href+baseLen;
                 if( pathstart )
                 {
                     if( '/' == *(++pathstart) )
@@ -503,7 +503,6 @@ relativeurl:
                     }
                     /* skip over host part */
                     pathstart = strchr(pathstart, '/');
-                    pathend = href+baseLen;
                     if( ! pathstart )
                     {
                         // no path, add a / past end of url (over '\0')
@@ -521,7 +520,6 @@ relativeurl:
                         return NULL;
                     }
                     pathstart = href;
-                    pathend = href+baseLen;
                 }
 
                 /* relative URL made of an absolute path ? */