mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-05 23:35:48 +03:00
remove the use of snprintf, and use libxml2 string API instead. try to
* xsltproc/xsltproc.c: remove the use of snprintf, and use libxml2 string API instead. * configure.in libxslt/xsltconfig.h.in libxslt/xsltutils.c: try to cope with architecture lacking some of the string functions, reuse the trio ones compiled in libxml2 , should close #97113 Daniel
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user