libxml2 r3683 - trunk
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: libxml2 r3683 - trunk
- Date: Tue, 5 Feb 2008 08:37:56 +0000 (GMT)
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]