diff options
author | Daniel Veillard <veillard@redhat.com> | 2009-09-18 11:43:35 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2009-09-18 11:43:35 +0200 |
commit | f44c92bfb91695ccfffd95b7e358c8740d413b19 (patch) | |
tree | 28b48defa41b03df8ec677a1ca26a9f092598cf4 | |
parent | 51f625a10a828b8cb8cd87aa171a3c1d9049c72c (diff) | |
download | libxslt-f44c92bfb91695ccfffd95b7e358c8740d413b19.tar.gz |
Fix a crash on misformed imported stylesheets
* libxslt/preproc.c: handle the case where xsl:template parent
is not an element.
-rw-r--r-- | libxslt/preproc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libxslt/preproc.c b/libxslt/preproc.c index 9a5e9d69..b47d8099 100644 --- a/libxslt/preproc.c +++ b/libxslt/preproc.c @@ -82,7 +82,7 @@ xsltCheckTopLevelElement(xsltStylesheetPtr style, xmlNodePtr inst, int err) { } return(0); } - if ((parent->ns == NULL) || + if ((parent->ns == NULL) || (parent->type != XML_ELEMENT_NODE) || ((parent->ns != inst->ns) && (!xmlStrEqual(parent->ns->href, inst->ns->href))) || ((!xmlStrEqual(parent->name, BAD_CAST "stylesheet")) && |