projects
/
platform
/
upstream
/
libxslt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2cd8a0
)
Hardening of code checking node types in EXSLT
author
Daniel Veillard
<veillard@redhat.com>
Thu, 16 Aug 2012 07:51:35 +0000
(15:51 +0800)
committer
Daniel Veillard
<veillard@redhat.com>
Thu, 16 Aug 2012 07:51:35 +0000
(15:51 +0800)
libexslt/functions.c
patch
|
blob
|
history
diff --git
a/libexslt/functions.c
b/libexslt/functions.c
index
13fd06e
..
4c68cea
100644
(file)
--- a/
libexslt/functions.c
+++ b/
libexslt/functions.c
@@
-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
*/