mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +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
|
||||
xsltprocExternalEntityLoader(const char *URL, const char *ID,
|
||||
xmlParserCtxtPtr ctxt) {
|
||||
xmlParserInputPtr ret;
|
||||
xmlParserInputPtr ret = NULL;
|
||||
warningSAXFunc warning = NULL;
|
||||
|
||||
int i;
|
||||
@ -182,7 +182,8 @@ xsltprocExternalEntityLoader(const char *URL, const char *ID,
|
||||
newURL = xmlStrcat(newURL, (const xmlChar *) "/");
|
||||
newURL = xmlStrcat(newURL, (const xmlChar *) lastsegment);
|
||||
if (newURL != NULL) {
|
||||
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
|
||||
if (defaultEntityLoader != NULL)
|
||||
ret = defaultEntityLoader((const char *)newURL, ID, ctxt);
|
||||
if (ret != NULL) {
|
||||
if (warning != NULL)
|
||||
ctxt->sax->warning = warning;
|
||||
|
Reference in New Issue
Block a user