mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-08-08 21:42:07 +03:00
Hardening of code checking node types in EXSLT
This commit is contained in:
@@ -459,10 +459,9 @@ exsltFuncFunctionComp (xsltStylesheetPtr style, xmlNodePtr inst) {
|
||||
xmlHashTablePtr data;
|
||||
exsltFuncFunctionData *func;
|
||||
|
||||
if ((style == NULL) || (inst == NULL))
|
||||
if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
|
||||
return;
|
||||
|
||||
|
||||
{
|
||||
xmlChar *qname;
|
||||
|
||||
@@ -546,6 +545,9 @@ exsltFuncResultComp (xsltStylesheetPtr style, xmlNodePtr inst,
|
||||
xmlChar *sel;
|
||||
exsltFuncResultPreComp *ret;
|
||||
|
||||
if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
|
||||
return (NULL);
|
||||
|
||||
/*
|
||||
* "Validity" checking
|
||||
*/
|
||||
|
Reference in New Issue
Block a user