1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-26 00:37:43 +03:00

xmlSaveUri() incorrectly recomposes URIs with rootless paths

For https://bugzilla.gnome.org/show_bug.cgi?id=731063

xmlSaveUri() of libxml2 (snapshot 2014-05-31 and earlier) returns
bogus values when called with URIs that have rootless paths
(e.g. "urx🅱️b" becomes "urx://b%3Ab" where "urx:b%3Ab" would be
correct)
This commit is contained in:
Dennis Filder
2014-06-13 14:56:14 +08:00
committed by Daniel Veillard
parent 3e0eec4319
commit 8eb55d782a

2
uri.c
View File

@@ -1194,8 +1194,6 @@ xmlSaveUri(xmlURIPtr uri) {
if (temp == NULL) goto mem_error;
ret = temp;
}
ret[len++] = '/';
ret[len++] = '/';
}
if (uri->path != NULL) {
p = uri->path;