vlc | branch: master | John Freed <[email protected]> | Sun Mar 18 22:29:27 
2012 +0100| [756655436269598a037ddece76e61446da4126e5] | committer: 
Jean-Baptiste Kempf

text: make_path returns (null) for Win32 if hostname starts with blank

Signed-off-by: Jean-Baptiste Kempf <[email protected]>

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

 src/text/strings.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index 7b709df..dc7d1f7 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -1223,6 +1223,9 @@ char *make_path (const char *url)
         if (!strncasecmp (path, "localhost/", 10))
             return memmove (path, path + 9, strlen (path + 9) + 1);
 #else
+        /* cannot start with a space */
+        if (*path == ' ')
+            goto out;
         for (char *p = strchr (path, '/'); p; p = strchr (p + 1, '/'))
             *p = '\\';
 

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to