[vlc-commits] text: make_path returns (null) for Win32 if hostname starts with blank
John Freed
git at videolan.org
Thu Mar 22 17:45:13 CET 2012
vlc | branch: master | John Freed <okvlc at johnfreed.com> | 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 <jb at videolan.org>
> 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 = '\\';
More information about the vlc-commits
mailing list