[vlc-devel] commit: Cosmetics (JP Dinger )

git version control git at videolan.org
Mon May 18 18:53:11 CEST 2009


vlc | branch: master | JP Dinger <jpd at m2x.nl> | Sun May 17 19:28:13 2009 +0200| [767b9137f409e7075f47e28e2aa6bfc715be8a79] | committer: Rémi Denis-Courmont 

Cosmetics

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 projects/mozilla/vlcplugin.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/projects/mozilla/vlcplugin.cpp b/projects/mozilla/vlcplugin.cpp
index 0d137cd..55c15ec 100644
--- a/projects/mozilla/vlcplugin.cpp
+++ b/projects/mozilla/vlcplugin.cpp
@@ -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 ? */




More information about the vlc-devel mailing list