mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-31 02:43:06 +03:00
Fix possible NULL pointer deref in xsltproc.c
Fixes bug #757618. https://bugzilla.gnome.org/show_bug.cgi?id=757618
This commit is contained in:
committed by
Nick Wellnhofer
parent
f76aadd3c3
commit
66520a2cc0
@ -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,
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user