Commit 66520a2c authored by mahendra.n's avatar mahendra.n Committed by Nick Wellnhofer

Fix possible NULL pointer deref in xsltproc.c

Fixes bug #757618.

https://bugzilla.gnome.org/show_bug.cgi?id=757618
parent f76aadd3
......@@ -140,7 +140,7 @@ xmlExternalEntityLoader defaultEntityLoader = NULL;
static xmlParserInputPtr
xsltprocExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt) {
xmlParserInputPtr ret;
xmlParserInputPtr ret = NULL;
warningSAXFunc warning = NULL;
int i;
......@@ -182,6 +182,7 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
newURL = xmlStrcat(newURL, (const xmlChar *) "/");
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
if (newURL != NULL) {
if (defaultEntityLoader != NULL)
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
if (ret != NULL) {
if (warning != NULL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment