Commit f2a657aa authored by William M. Brack's avatar William M. Brack
Browse files

fixed a stupid mistake in xmlBuildRelativeURI (bug 156527)

* uri.c: fixed a stupid mistake in xmlBuildRelativeURI
  (bug 156527)
parent 8e2c9792
Wed Oct 27 09:31:24 PDT 2004 William Brack <wbrack@mmm.com.hk>
* uri.c: fixed a stupid mistake in xmlBuildRelativeURI
(bug 156527)
Wed Oct 27 11:44:35 CEST 2004 Daniel Veillard <daniel@veillard.com>
 
* nanoftp.c nanohttp.c: second part of the security fix for
......
......@@ -2095,10 +2095,12 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
if (ref->path[ix] == '/')
break;
}
if (ix == 0)
if (ix == 0) {
uptr = (xmlChar *)ref->path;
else
uptr = (xmlChar *)&ref->path[ix + 1];
} else {
ix++;
uptr = (xmlChar *)&ref->path[ix];
}
/*
* In base, count the number of '/' from the differing point
......@@ -2114,7 +2116,6 @@ xmlBuildRelativeURI (const xmlChar * URI, const xmlChar * base)
val = xmlStrdup (uptr);
goto done;
}
nbslash--;
/*
* Allocate just enough space for the returned string -
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment