mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-10-24 01:09:01 +03:00
xmllint: Add NULL checks for xmlStrdup/xmlStrcat in resource loader
This commit is contained in:
committed by
Daniel Garcia Moreno
parent
174201f747
commit
32387d3f34
@@ -305,7 +305,11 @@ xmllintResourceLoader(void *ctxt, const char *URL,
|
||||
xmlChar *newURL;
|
||||
|
||||
newURL = xmlStrdup((const xmlChar *) lint->paths[i]);
|
||||
if (newURL == NULL)
|
||||
return(XML_ERR_NO_MEMORY);
|
||||
newURL = xmlStrcat(newURL, (const xmlChar *) "/");
|
||||
if (newURL == NULL)
|
||||
return(XML_ERR_NO_MEMORY);
|
||||
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
|
||||
if (newURL != NULL) {
|
||||
if (lint->defaultResourceLoader != NULL)
|
||||
|
||||
Reference in New Issue
Block a user