[libxslt] Crash compiling stylesheet with DTD
- From: Daniel Veillard <veillard src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libxslt] Crash compiling stylesheet with DTD
- Date: Wed, 16 Sep 2009 17:03:24 +0000 (UTC)
commit 7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
Author: Martin <gzlist googlemail com>
Date: Wed Sep 16 19:02:16 2009 +0200
Crash compiling stylesheet with DTD
* libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation
process could get seriously wrong
libxslt/xslt.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libxslt/xslt.c b/libxslt/xslt.c
index 00f264f..c289a9f 100644
--- a/libxslt/xslt.c
+++ b/libxslt/xslt.c
@@ -4940,13 +4940,14 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
* okay this is an extension element compile it too
*/
xsltStylePreCompute(style, cur);
- } else {
+ }
+ else if (cur->type == XML_ELEMENT_NODE)
+ {
/*
* This is an element which will be output as part of the
* template exectution, precompile AVT if found.
*/
- if ((cur->ns == NULL) && (style->defaultAlias != NULL) &&
- (cur->type == XML_ELEMENT_NODE)) {
+ if ((cur->ns == NULL) && (style->defaultAlias != NULL)) {
cur->ns = xmlSearchNsByHref(cur->doc, cur,
style->defaultAlias);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]