summaryrefslogtreecommitdiff
path: root/xsltproc
diff options
context:
space:
mode:
Diffstat (limited to 'xsltproc')
-rw-r--r--xsltproc/xsltproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xsltproc/xsltproc.c b/xsltproc/xsltproc.c
index 2db74f20..09b239ff 100644
--- a/xsltproc/xsltproc.c
+++ b/xsltproc/xsltproc.c
@@ -175,10 +175,10 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
xmlChar *newURL;
int len;
- len = xmlStrlen(paths[i]) + xmlStrlen(BAD_CAST URL) + 5;
- newURL = xmlMalloc(len);
+ newURL = xmlStrdup((const xmlChar *) paths[i]);
+ newURL = xmlStrcat(newURL, (const xmlChar *) "/");
+ newURL = xmlStrcat(newURL, (const xmlChar *) URL);
if (newURL != NULL) {
- snprintf(newURL, len, "%s/%s", paths[i], URL);
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
xmlFree(newURL);
if (ret != NULL) {