aboutsummaryrefslogtreecommitdiffstats
path: root/uri.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-08-22 23:36:12 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-08-22 23:36:12 +0000
commit52402ce7ebfc7af69c4f7789338fcd74f3a05e30 (patch)
treed184ab79c33510ffc211b0d7d651300e513b9ba3 /uri.c
parentaf7fc34f223d9ac48daae56c3810fb3dce827284 (diff)
downloadandroid_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.tar.gz
android_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.tar.bz2
android_external_libxml2-52402ce7ebfc7af69c4f7789338fcd74f3a05e30.zip
bug fixes, bugfixes, bugfixes ...
- parser.c: Fixed Bug#21552: libxml fails to decode &amp; - uri.c testUri.c patches, by Marc Sanfacon (1 left) - parser.c HTMLparser.c: HTML/encoding push problems reportedi by Wayne Davison Daniel
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/uri.c b/uri.c
index 1ed14104..28810c7c 100644
--- a/uri.c
+++ b/uri.c
@@ -1024,6 +1024,7 @@ xmlParseURIPathSegments(xmlURIPtr uri, const char **str, int slash) {
*str = cur;
return(-1);
}
+ path[len] = '\0';
if (uri->path != NULL)
memcpy(path, uri->path, len2);
if (slash) {
@@ -1614,6 +1615,13 @@ xmlBuildURI(const xmlChar *URI, const xmlChar *base) {
*/
if (ref->path != NULL) {
index = 0;
+ /*
+ * Ensure the path includes a '/'
+ */
+ if (res->path[0] != '/' && ref->path[0] != 0 &&
+ ref->path[index] != '/') {
+ res->path[out++] = '/';
+ }
while (ref->path[index] != 0) {
res->path[out++] = ref->path[index++];
}