aboutsummaryrefslogtreecommitdiffstats
path: root/uri.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2000-08-26 21:40:43 +0000
committerDaniel Veillard <veillard@src.gnome.org>2000-08-26 21:40:43 +0000
commitf0cc7ccc7db45fe1c055768a50be2243ed4e863c (patch)
tree66b1fd6fc5abda86dbe5012a8c015875795efe00 /uri.c
parent088f428a20b4abff1925d0f811a2b4343591b2ce (diff)
downloadandroid_external_libxml2-f0cc7ccc7db45fe1c055768a50be2243ed4e863c.tar.gz
android_external_libxml2-f0cc7ccc7db45fe1c055768a50be2243ed4e863c.tar.bz2
android_external_libxml2-f0cc7ccc7db45fe1c055768a50be2243ed4e863c.zip
libxml now grok Docbook-3.1.5 and Docbook-4.1.1 DTDs, this
popped out a couple of bugs and 3 speed issues, there is only on minor speed issue left. Assorted collection of user reported bugs and fixes: - doc/encoding.html: added encoding aliases doc - doc/xml.html: updates - encoding.[ch]: added EncodingAliases functions - entities.[ch] valid.[ch] debugXML.c: removed two serious bottleneck affecting large DTDs like Docbook - parser.[ch] xmllint.c: added a pedantic option, will be useful - SAX.c: redefinition of entities is reported in pedantic mode - testHTML.c: uninitialized warning from gcc - uri.c: fixed a couple of bugs - TODO: added issue raised by Michael Daniel
Diffstat (limited to 'uri.c')
-rw-r--r--uri.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/uri.c b/uri.c
index 28810c7c..4f4452a6 100644
--- a/uri.c
+++ b/uri.c
@@ -1024,14 +1024,15 @@ 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) {
path[len2] = '/';
len2++;
}
- xmlURIUnescapeString(*str, cur - *str, &path[len2]);
+ path[len2] = 0;
+ if (cur - *str > 0)
+ xmlURIUnescapeString(*str, cur - *str, &path[len2]);
if (uri->path != NULL)
xmlFree(uri->path);
uri->path = path;