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; ...@@ -140,7 +140,7 @@ xmlExternalEntityLoader defaultEntityLoader = NULL;
static xmlParserInputPtr static xmlParserInputPtr
xsltprocExternalEntityLoader(const char *URL, const char *ID, xsltprocExternalEntityLoader(const char *URL, const char *ID,
xmlParserCtxtPtr ctxt) { xmlParserCtxtPtr ctxt) {
xmlParserInputPtr ret; xmlParserInputPtr ret = NULL;
warningSAXFunc warning = NULL; warningSAXFunc warning = NULL;
int i; int i;
...@@ -182,7 +182,8 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID, ...@@ -182,7 +182,8 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
newURL = xmlStrcat(newURL, (const xmlChar *) "/"); newURL = xmlStrcat(newURL, (const xmlChar *) "/");
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment); newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
if (newURL != NULL) { if (newURL != NULL) {
ret = defaultEntityLoader((const char *)newURL, ID, ctxt); if (defaultEntityLoader != NULL)
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
if (ret != NULL) { if (ret != NULL) {
if (warning != NULL) if (warning != NULL)
ctxt->sax->warning = warning; ctxt->sax->warning = warning;
......
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