libxml2 r3683 - trunk



Author: veillard
Date: Tue Feb  5 08:37:56 2008
New Revision: 3683
URL: http://svn.gnome.org/viewvc/libxml2?rev=3683&view=rev

Log:
* uri.c: applied a patch based on Petr Sumbera one to avoid a 
  problem with paths starting with //
Daniel


Modified:
   trunk/ChangeLog
   trunk/uri.c

Modified: trunk/uri.c
==============================================================================
--- trunk/uri.c	(original)
+++ trunk/uri.c	Tue Feb  5 08:37:56 2008
@@ -2418,6 +2418,11 @@
 
     if (path == NULL)
 	return(NULL);
+
+    /* sanitize filename starting with // so it can be used as URI */
+    if ((path[0] == '/') && (path[1] == '/') && (path[2] != '/'))
+        path++;
+
     if ((uri = xmlParseURI((const char *) path)) != NULL) {
 	xmlFreeURI(uri);
 	return xmlStrdup(path);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]