summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Rostovtsev <tetromino@gentoo.org>2012-09-10 05:28:43 +0000
committerAlexandre Rostovtsev <tetromino@gentoo.org>2012-09-10 05:28:43 +0000
commit40916332289c5e7481392cf241c551802c29769c (patch)
tree05a414b1e09e7d146fca7be97b8834234fd65e98 /dev-libs
parentEnsure special treatment for namespace nodes (CVE-2012-2871) and fix use-afte... (diff)
downloadhistorical-40916332289c5e7481392cf241c551802c29769c.tar.gz
historical-40916332289c5e7481392cf241c551802c29769c.tar.bz2
historical-40916332289c5e7481392cf241c551802c29769c.zip
Remove duplicate patch file.
Package-Manager: portage-2.2.0_alpha124/cvs/Linux x86_64
Diffstat (limited to 'dev-libs')
-rw-r--r--dev-libs/libxslt/ChangeLog6
-rw-r--r--dev-libs/libxslt/Manifest17
-rw-r--r--dev-libs/libxslt/files/0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch590
3 files changed, 13 insertions, 600 deletions
diff --git a/dev-libs/libxslt/ChangeLog b/dev-libs/libxslt/ChangeLog
index 321bd34b1833..ff6fbe36d725 100644
--- a/dev-libs/libxslt/ChangeLog
+++ b/dev-libs/libxslt/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/libxslt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/ChangeLog,v 1.230 2012/09/10 05:24:48 tetromino Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxslt/ChangeLog,v 1.231 2012/09/10 05:28:43 tetromino Exp $
+
+ 10 Sep 2012; Alexandre Rostovtsev <tetromino@gentoo.org>
+ -files/0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch:
+ Remove duplicate patch file.
*libxslt-1.1.26-r4 (10 Sep 2012)
diff --git a/dev-libs/libxslt/Manifest b/dev-libs/libxslt/Manifest
index f6981bd75016..17bd0c6580ea 100644
--- a/dev-libs/libxslt/Manifest
+++ b/dev-libs/libxslt/Manifest
@@ -1,7 +1,6 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-AUX 0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch 20055 SHA256 cbc672841327b0d5bd7bf8f8e1a1d30f3852d495434210fbc199a69a7cdc08c5 SHA512 c41dc3adf91ddc33b26b2d66e9073c63b87eff83c8b7ea36031d19b4efb69adae096752e617fd68e928c91c238fa7639282f5c75ce8702f15ab7192672199bcf WHIRLPOOL 542bd489e1d2d78092fa298c02f297c01acd80c37299b4d7627171bcac7b14d023a195f0aec2506cde1572432ea49850ee4c76a981984eab97830e2ba5cf8da4
AUX libxslt-1.1.23-parallel-install.patch 578 SHA256 9b2fa23d7a4fef60c8acec7e8003bc42f4a4c9c1dbd5e035aa54af3e8ccecd5a SHA512 1a3032f7564e9001bfa7d622e1c538accbe5edd32ddfbb38c7ecc09c361a5bb389c3718b1e36b794bf5204766d66f2ea5f96cb43c9f7e2c0a1ddc3ae2377e640 WHIRLPOOL 27bbd1c4f1a984982b727a8a32742f72b80322af7c3098cf07f11ec681d8d8e32a0519344afe2f96fda5a55ab7793b713c0d5f10b08a5ebd06b32d41f8661cf3
AUX libxslt-1.1.26-disable_static_modules.patch 318 SHA256 6c08da472bd1d48af1aab88619e460ad17f56c49bfaa00ccbfd8acf9212c5e80 SHA512 c54fa2b0edcdadde68f3d63bc8f39404eea7d5b866c1b2b0989c0cb343e25bd78da047434314447d3e5773b2c9e1455bcc82153c83541f12ecf4169919f3187a WHIRLPOOL 12984a243827e5bb25293d760f4d74f493254e5e90b48c6be20928aeae68cbfe71c345868165324af83c685781d0fd1b4e3594347e89964dfa3db5bf1ab58a55
AUX libxslt-1.1.26-generate-id-crash.patch 1588 SHA256 d7b6c83dbc0635e514b413a2a3b8f8ceb436d54f3e1757c8574f2fcf894255ea SHA512 47146de18ce56cbf5fa39b396a42d9b788ad679bdf1a4cb87195ffe5bf68be5f3241eda59783b42bdecc5319baa247905fec1a9ceb5f5ed901872e4c1fb54e8f WHIRLPOOL 7eab0ec5623c3f23360dced0e50bf7918aace8190679c2f09e95864a3bd76e3bbb9a69622805ef0b9ad4e00559e875cd11e583c7dde1939ec09e918b0c584ba7
@@ -18,16 +17,16 @@ DIST libxslt-1.1.26.tar.gz 3401513 SHA256 55dd52b42861f8a02989d701ef716d6280bfa0
EBUILD libxslt-1.1.26-r2.ebuild 2919 SHA256 b286101edaaafa9e446312d1a32b15b67f7d4bdbbeb68e73c07fd4f738663aeb SHA512 1592011818e99f930b2cf461ce24de1719c872381af5e49c8563c9f8976cfd7936141cd473b1efe536fd5b6b04dbb4fff3b857a8d5b71aea5cf2628c5afa3094 WHIRLPOOL e32df421f636af02b363c382b2c96b61369cda069f092e2d7926ba6ccb0fe644efed06473e2752edd92fb82aa151b1bcdfa2769c0f22cfce4fec5bddbda52153
EBUILD libxslt-1.1.26-r3.ebuild 3029 SHA256 3c9e0635a8fbd38bce60d6aa32a389480952c95b0fa2401fe8a5e52d0e632617 SHA512 c8692b5c796dce6c449f8e9acec0e73adf78c29b01b855003d842ae4376189a800a42df3990e0316de083dc72483723664d660c29eab5e2c4f5263c3e809c6cd WHIRLPOOL 7ab8574e98e5f09447a978df4d3c791969e0b652ea071ca1d37fe43339280fbea2b16c41bb57865bbc8f7e406f1f078189be215b42bae2a2e1f483230188b565
EBUILD libxslt-1.1.26-r4.ebuild 3386 SHA256 58ffb40a4a2fa787c727b423818c6f55a6eb725909652c50cee6851831ba930f SHA512 aa40ca783fab1b9f98d7cf7e5037df755e8d901777b7ad05951aab168ef153ea5853e10c2ab00851fa8d36bc683d4ad8d3365f827121d1480ea0ad975ea6ea9d WHIRLPOOL de6d4885bf0f0663b3762428140e84a19ddac187d959de18ab3e1e2f8405f4c965fd8b35c5f66292db15ea3d0a936affff4c21c9ee478a867d220f84d6c655a5
-MISC ChangeLog 28373 SHA256 754edba6d89804b2bdac7973b05217b2f6ce2bfaaca32f4537751b6b53a4621e SHA512 5920dfc213e4594ae2c839fb6a161f97206a6be53907d3c926bf149d9b0e19e0fee86b9ef28d38b10719c283fdd8a1bbe3d236fc98ce206fa1c290f8afcb97a0 WHIRLPOOL b9597830c5cba3cf0c5a9641a0b05e14b8fe6cf4c7cfcfca127352be4fac727b6a6676b5f2ef45b80d02e40961469ae303bb0ef91b1169b2de6422ddba8ab3bd
+MISC ChangeLog 28538 SHA256 5fb9c30f5fa01c01399769bcdc25d07ae82aa9d3ce85122ce91ad67fd33018c3 SHA512 70463eee18d128e1708cea5aef6d8825ff7c0e1d0b29d91d80a7f331ec843a6cffe72799539fa1340f307c7f804681f0afe3a4a93a1229a840eb0f04ac4814fe WHIRLPOOL e731e3e53d9bc991f02af2f220e24e79371ca6e553061f654cf32787609d60e7ebe8e5f9be8b10dc1cf922f0eec7e367c47dd0978a4e87e47f958958605275d6
MISC metadata.xml 158 SHA256 3a7dbca0fdc557de69783e0663e2d76ddab129ea8a19b2d0ef6d3e5d1b947ce1 SHA512 7fbfbd2b3ed1b81867d55648509f778fdbe2091af53727b3426a3c7f453ae7e1663a99fdd2101508b8d6c85b3158459c93551b77a6a394f02d7e11cbc8a5ecf4 WHIRLPOOL 4bcd5662974877d42ebc4361b6eb412bfeea2af7144b436ce7ed152327d554afc321c376625ba0bb85a704b70d86e3c4882dff3573047acddd8ffccf655d4f7e
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCAAGBQJQTXmlAAoJEJ0WA1zPCt1hF5cIAJtigqp/zVRW5l4P8lTEqBSF
-BD5jna9aWJeG6JRUb73btE3vjoe6dAk9ahIuCloL42xdMp7H96ct5fpBEITH6r0q
-QsiJwcplVb5Mshr3A7mhgK7YHITu9JwC0nGKgbJj6qGs+ApeGG5wbP8b/JjYvSm5
-cBxsY5Se8qpPSIzdUuk3bJALcq8FXA356uLCUvneyPTd2rBXmYX9PD25BwHQmFbr
-sbZtUmy1Rz6RtAe3nyuPUhfKravCBg77bfLdYateQDkcvjY3MpWjSTfRi6CozilP
-yLTQCO+jS+jzP4oAiVlCqpzXNtGPdG6Ozzgk1sWHmGxAvfNxnlVhzs4eols3ytw=
-=2LV9
+iQEcBAEBCAAGBQJQTXqRAAoJEJ0WA1zPCt1hzsMH/jwG7PVT+sz/NhPcHI6T3Ekx
+H/yyw5kFcDiiF12UB/5VVtE9+XdGU934EGVKOtfKMASSjlnhNj4B9k510ixVTybz
+4MMnAcX6kWbj9oR7v3A2GN/eKO+cWQsDIq+i3IZvbxraMwadWtPPM64S8Ye+HKBJ
+YWgzgvvQrlbIFMacsqAMnoBiwH49LzivmQf3ov2L+iYWN2lN8cvoqWDf0fHeOaWN
+U3EmeCZgaEg0GPDqoyFi6Po3cAF2kn2mSEcx4/d3zAsXzGioh9uSpKOsZ+DZgesY
+1mVYhX1AxQg3wI+iFN2zgYJVO88H2ZtQA2PNZACPU1f39DiM7J3pvlc23VHa/Zk=
+=/1bA
-----END PGP SIGNATURE-----
diff --git a/dev-libs/libxslt/files/0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch b/dev-libs/libxslt/files/0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch
deleted file mode 100644
index d8081b2b829d..000000000000
--- a/dev-libs/libxslt/files/0002-Hardening-ofcodecheckingnodetypesinvariousentrypoint.patch
+++ /dev/null
@@ -1,590 +0,0 @@
-From 1564b30e994602a95863d9716be83612580a2fed Mon Sep 17 00:00:00 2001
-From: Daniel Veillard <veillard@redhat.com>
-Date: Thu, 9 Aug 2012 16:18:51 +0800
-Subject: [PATCH] Hardening of code checking node types in various entry point
-
----
- libxslt/attributes.c | 5 +++--
- libxslt/preproc.c | 45 +++++++++++++++++++++++----------------------
- libxslt/templates.c | 15 ++++++++++-----
- libxslt/transform.c | 2 +-
- libxslt/variables.c | 10 +++++-----
- libxslt/xslt.c | 43 +++++++++++++++++++++++++------------------
- libxslt/xsltutils.c | 27 +++++++++++++++++++--------
- 7 files changed, 86 insertions(+), 61 deletions(-)
-
-diff --git a/libxslt/attributes.c b/libxslt/attributes.c
-index ce47df7..11d558b 100644
---- a/libxslt/attributes.c
-+++ b/libxslt/attributes.c
-@@ -293,7 +293,7 @@ xsltParseStylesheetAttributeSet(xsltStylesheetPtr style, xmlNodePtr cur) {
- xmlNodePtr child;
- xsltAttrElemPtr attrItems;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- value = xmlGetNsProp(cur, (const xmlChar *)"name", NULL);
-@@ -656,7 +656,8 @@ xsltAttributeInternal(xsltTransformContextPtr ctxt,
- xmlNsPtr ns = NULL;
- xmlAttrPtr attr;
-
-- if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL))
-+ if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL) ||
-+ (inst->type != XML_ELEMENT_NODE) )
- return;
-
- /*
-diff --git a/libxslt/preproc.c b/libxslt/preproc.c
-index f5d265d..4d483ff 100644
---- a/libxslt/preproc.c
-+++ b/libxslt/preproc.c
-@@ -680,7 +680,7 @@ xsltSortComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- #else
- xsltStylePreCompPtr comp;
- #endif
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -788,7 +788,7 @@ xsltCopyComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
- #ifdef XSLT_REFACTORED
- comp = (xsltStyleItemCopyPtr) xsltNewStylePreComp(style, XSLT_FUNC_COPY);
-@@ -832,7 +832,7 @@ xsltTextComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- #endif
- const xmlChar *prop;
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -885,7 +885,7 @@ xsltElementComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- * <!-- Content: template -->
- * </xsl:element>
- */
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1002,7 +1002,7 @@ xsltAttributeComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- * <!-- Content: template -->
- * </xsl:attribute>
- */
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1122,7 +1122,7 @@ xsltCommentComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1152,7 +1152,7 @@ xsltProcessingInstructionComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1186,7 +1186,7 @@ xsltCopyOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1233,7 +1233,7 @@ xsltValueOfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- #endif
- const xmlChar *prop;
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1358,7 +1358,7 @@ xsltWithParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1417,7 +1417,7 @@ xsltNumberComp(xsltStylesheetPtr style, xmlNodePtr cur) {
- #endif
- const xmlChar *prop;
-
-- if ((style == NULL) || (cur == NULL))
-+ if ((style == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1543,7 +1543,7 @@ xsltApplyImportsComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1573,7 +1573,7 @@ xsltCallTemplateComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1612,7 +1612,7 @@ xsltApplyTemplatesComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1664,7 +1664,7 @@ xsltChooseComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1695,7 +1695,7 @@ xsltIfComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1741,7 +1741,7 @@ xsltWhenComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1787,7 +1787,7 @@ xsltForEachComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1835,7 +1835,7 @@ xsltVariableComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -1914,7 +1914,7 @@ xsltParamComp(xsltStylesheetPtr style, xmlNodePtr inst) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((style == NULL) || (inst == NULL))
-+ if ((style == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -2006,7 +2006,7 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr node) {
- * the parsing mechanism for all elements in the XSLT namespace.
- */
- if (style == NULL) {
-- if (node != NULL)
-+ if ((node != NULL) && (node->type == XML_ELEMENT_NODE))
- node->psvi = NULL;
- return;
- }
-@@ -2221,7 +2221,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
- * namespace- and local-name of the node, but can evaluate this
- * using cctxt->style->inode->category;
- */
-- if (inst->psvi != NULL)
-+ if ((inst == NULL) || (inst->type != XML_ELEMENT_NODE) ||
-+ (inst->psvi != NULL))
- return;
-
- if (IS_XSLT_ELEM(inst)) {
-diff --git a/libxslt/templates.c b/libxslt/templates.c
-index 52bb3cf..169afd9 100644
---- a/libxslt/templates.c
-+++ b/libxslt/templates.c
-@@ -198,7 +198,8 @@ xsltEvalTemplateString(xsltTransformContextPtr ctxt,
- xmlNodePtr oldInsert, insert = NULL;
- xmlChar *ret;
-
-- if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL))
-+ if ((ctxt == NULL) || (contextNode == NULL) || (inst == NULL) ||
-+ (inst->type != XML_ELEMENT_NODE))
- return(NULL);
-
- if (inst->children == NULL)
-@@ -390,7 +391,8 @@ xsltEvalAttrValueTemplate(xsltTransformContextPtr ctxt, xmlNodePtr inst,
- xmlChar *ret;
- xmlChar *expr;
-
-- if ((ctxt == NULL) || (inst == NULL) || (name == NULL))
-+ if ((ctxt == NULL) || (inst == NULL) || (name == NULL) ||
-+ (inst->type != XML_ELEMENT_NODE))
- return(NULL);
-
- expr = xsltGetNsProp(inst, name, ns);
-@@ -434,7 +436,8 @@ xsltEvalStaticAttrValueTemplate(xsltStylesheetPtr style, xmlNodePtr inst,
- const xmlChar *ret;
- xmlChar *expr;
-
-- if ((style == NULL) || (inst == NULL) || (name == NULL))
-+ if ((style == NULL) || (inst == NULL) || (name == NULL) ||
-+ (inst->type != XML_ELEMENT_NODE))
- return(NULL);
-
- expr = xsltGetNsProp(inst, name, ns);
-@@ -475,7 +478,8 @@ xsltAttrTemplateProcess(xsltTransformContextPtr ctxt, xmlNodePtr target,
- const xmlChar *value;
- xmlAttrPtr ret;
-
-- if ((ctxt == NULL) || (attr == NULL) || (target == NULL))
-+ if ((ctxt == NULL) || (attr == NULL) || (target == NULL) ||
-+ (target->type != XML_ELEMENT_NODE))
- return(NULL);
-
- if (attr->type != XML_ATTRIBUTE_NODE)
-@@ -632,7 +636,8 @@ xsltAttrListTemplateProcess(xsltTransformContextPtr ctxt,
- const xmlChar *value;
- xmlChar *valueAVT;
-
-- if ((ctxt == NULL) || (target == NULL) || (attrs == NULL))
-+ if ((ctxt == NULL) || (target == NULL) || (attrs == NULL) ||
-+ (target->type != XML_ELEMENT_NODE))
- return(NULL);
-
- oldInsert = ctxt->insert;
-diff --git a/libxslt/transform.c b/libxslt/transform.c
-index c6df19e..bc6d851 100644
---- a/libxslt/transform.c
-+++ b/libxslt/transform.c
-@@ -777,7 +777,7 @@ xsltCopyTextString(xsltTransformContextPtr ctxt, xmlNodePtr target,
- #endif
-
- /*
-- * Play save and reset the merging mechanism for every new
-+ * Play safe and reset the merging mechanism for every new
- * target node.
- */
- if ((target == NULL) || (target->children == NULL)) {
-diff --git a/libxslt/variables.c b/libxslt/variables.c
-index cb0d4b0..2d26872 100644
---- a/libxslt/variables.c
-+++ b/libxslt/variables.c
-@@ -1935,7 +1935,7 @@ xsltParseStylesheetCallerParam(xsltTransformContextPtr ctxt, xmlNodePtr inst)
- the instruction itself. */
- xsltStackElemPtr param = NULL;
-
-- if ((ctxt == NULL) || (inst == NULL))
-+ if ((ctxt == NULL) || (inst == NULL) || (inst->type != XML_ELEMENT_NODE))
- return(NULL);
-
- #ifdef XSLT_REFACTORED
-@@ -1994,7 +1994,7 @@ xsltParseGlobalVariable(xsltStylesheetPtr style, xmlNodePtr cur)
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -2056,7 +2056,7 @@ xsltParseGlobalParam(xsltStylesheetPtr style, xmlNodePtr cur) {
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- #ifdef XSLT_REFACTORED
-@@ -2119,7 +2119,7 @@ xsltParseStylesheetVariable(xsltTransformContextPtr ctxt, xmlNodePtr inst)
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((inst == NULL) || (ctxt == NULL))
-+ if ((inst == NULL) || (ctxt == NULL) || (inst->type != XML_ELEMENT_NODE))
- return;
-
- comp = inst->psvi;
-@@ -2161,7 +2161,7 @@ xsltParseStylesheetParam(xsltTransformContextPtr ctxt, xmlNodePtr cur)
- xsltStylePreCompPtr comp;
- #endif
-
-- if ((cur == NULL) || (ctxt == NULL))
-+ if ((cur == NULL) || (ctxt == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- comp = cur->psvi;
-diff --git a/libxslt/xslt.c b/libxslt/xslt.c
-index 6293bb3..2bc8af5 100644
---- a/libxslt/xslt.c
-+++ b/libxslt/xslt.c
-@@ -1162,9 +1162,9 @@ xsltParseStylesheetOutput(xsltStylesheetPtr style, xmlNodePtr cur)
- xmlChar *element,
- *end;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
--
-+
- prop = xmlGetNsProp(cur, (const xmlChar *) "version", NULL);
- if (prop != NULL) {
- if (style->version != NULL)
-@@ -1377,12 +1377,12 @@ xsltParseStylesheetDecimalFormat(xsltStylesheetPtr style, xmlNodePtr cur)
- xmlChar *prop;
- xsltDecimalFormatPtr format;
- xsltDecimalFormatPtr iter;
--
-- if ((cur == NULL) || (style == NULL))
-+
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- format = style->decimalFormat;
--
-+
- prop = xmlGetNsProp(cur, BAD_CAST("name"), NULL);
- if (prop != NULL) {
- format = xsltDecimalFormatGetByName(style, prop);
-@@ -1484,7 +1484,7 @@ xsltParseStylesheetPreserveSpace(xsltStylesheetPtr style, xmlNodePtr cur) {
- xmlChar *elements;
- xmlChar *element, *end;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- elements = xmlGetNsProp(cur, (const xmlChar *)"elements", NULL);
-@@ -1558,7 +1558,7 @@ xsltParseStylesheetExtPrefix(xsltStylesheetPtr style, xmlNodePtr cur,
- xmlChar *prefixes;
- xmlChar *prefix, *end;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- if (isXsltElem) {
-@@ -1623,7 +1623,7 @@ xsltParseStylesheetStripSpace(xsltStylesheetPtr style, xmlNodePtr cur) {
- xmlChar *elements;
- xmlChar *element, *end;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return;
-
- elements = xmlGetNsProp(cur, (const xmlChar *)"elements", NULL);
-@@ -1696,7 +1696,7 @@ xsltParseStylesheetExcludePrefix(xsltStylesheetPtr style, xmlNodePtr cur,
- xmlChar *prefixes;
- xmlChar *prefix, *end;
-
-- if ((cur == NULL) || (style == NULL))
-+ if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE))
- return(0);
-
- if (isXsltElem)
-@@ -4287,7 +4287,7 @@ static int
- xsltParseUnknownXSLTElem(xsltCompilerCtxtPtr cctxt,
- xmlNodePtr node)
- {
-- if ((cctxt == NULL) || (node == NULL))
-+ if ((cctxt == NULL) || (node == NULL) || (node->type != XML_ELEMENT_NODE))
- return(-1);
-
- /*
-@@ -4384,7 +4384,7 @@ xsltParseSequenceConstructor(xsltCompilerCtxtPtr cctxt, xmlNodePtr cur)
- if (cctxt->inode->category == XSLT_ELEMENT_CATEGORY_EXTENSION) {
- cctxt->inode->extContentHandled = 1;
- }
-- if (cur == NULL)
-+ if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL))
- return;
- /*
- * This is the content reffered to as a "template".
-@@ -4789,7 +4789,8 @@ xsltParseSequenceConstructor(xsltCompilerCtxtPtr cctxt, xmlNodePtr cur)
- */
- void
- xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
-- if ((style == NULL) || (templ == NULL))
-+ if ((style == NULL) || (templ == NULL) ||
-+ (templ->type == XML_NAMESPACE_DECL))
- return;
-
- /*
-@@ -4838,6 +4839,10 @@ xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
- void
- xsltParseTemplateContent(xsltStylesheetPtr style, xmlNodePtr templ) {
- xmlNodePtr cur, delete;
-+
-+ if ((style == NULL) || (templ == NULL) ||
-+ (templ->type == XML_NAMESPACE_DECL)) return;
-+
- /*
- * This content comes from the stylesheet
- * For stylesheets, the set of whitespace-preserving
-@@ -5057,7 +5062,7 @@ xsltParseStylesheetKey(xsltStylesheetPtr style, xmlNodePtr key) {
- xmlChar *name = NULL;
- xmlChar *nameURI = NULL;
-
-- if ((style == NULL) || (key == NULL))
-+ if ((style == NULL) || (key == NULL) || (key->type != XML_ELEMENT_NODE))
- return;
-
- /*
-@@ -5147,7 +5152,8 @@ xsltParseXSLTTemplate(xsltCompilerCtxtPtr cctxt, xmlNodePtr templNode) {
- xmlChar *prop;
- double priority;
-
-- if ((cctxt == NULL) || (templNode == NULL))
-+ if ((cctxt == NULL) || (templNode == NULL) ||
-+ (templNode->type != XML_ELEMENT_NODE))
- return;
-
- /*
-@@ -5308,7 +5314,8 @@ xsltParseStylesheetTemplate(xsltStylesheetPtr style, xmlNodePtr template) {
- xmlChar *modeURI = NULL;
- double priority;
-
-- if (template == NULL)
-+ if ((style == NULL) || (template == NULL) ||
-+ (template->type != XML_ELEMENT_NODE))
- return;
-
- /*
-@@ -5440,7 +5447,7 @@ static xsltStyleItemIncludePtr
- xsltCompileXSLTIncludeElem(xsltCompilerCtxtPtr cctxt, xmlNodePtr node) {
- xsltStyleItemIncludePtr item;
-
-- if ((cctxt == NULL) || (node == NULL))
-+ if ((cctxt == NULL) || (node == NULL) || (node->type != XML_ELEMENT_NODE))
- return(NULL);
-
- node->psvi = NULL;
-@@ -5960,7 +5967,7 @@ xsltParseXSLTStylesheetElem(xsltCompilerCtxtPtr cctxt, xmlNodePtr node)
- {
- xmlNodePtr cur, start;
-
-- if ((cctxt == NULL) || (node == NULL))
-+ if ((cctxt == NULL) || (node == NULL) || (node->type != XML_ELEMENT_NODE))
- return(-1);
-
- if (node->children == NULL)
-@@ -6048,7 +6055,7 @@ xsltParseStylesheetTop(xsltStylesheetPtr style, xmlNodePtr top) {
- int templates = 0;
- #endif
-
-- if (top == NULL)
-+ if ((top == NULL) || (top->type != XML_ELEMENT_NODE))
- return;
-
- prop = xmlGetNsProp(top, (const xmlChar *)"version", NULL);
-diff --git a/libxslt/xsltutils.c b/libxslt/xsltutils.c
-index 7a4caf0..6a0e8f2 100644
---- a/libxslt/xsltutils.c
-+++ b/libxslt/xsltutils.c
-@@ -91,10 +91,15 @@ xsltGetCNsProp(xsltStylesheetPtr style, xmlNodePtr node,
- if ((node == NULL) || (style == NULL) || (style->dict == NULL))
- return(NULL);
-
-- prop = node->properties;
-- if (nameSpace == NULL) {
-+ if (nameSpace == NULL)
- return xmlGetProp(node, name);
-- }
-+
-+ if (node->type == XML_NAMESPACE_DECL)
-+ return(NULL);
-+ if (node->type == XML_ELEMENT_NODE)
-+ prop = node->properties;
-+ else
-+ prop = NULL;
- while (prop != NULL) {
- /*
- * One need to have
-@@ -131,7 +136,7 @@ xsltGetCNsProp(xsltStylesheetPtr style, xmlNodePtr node,
- attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name);
- if ((attrDecl == NULL) && (doc->extSubset != NULL))
- attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name);
--
-+
- if ((attrDecl != NULL) && (attrDecl->prefix != NULL)) {
- /*
- * The DTD declaration only allows a prefix search
-@@ -173,7 +178,15 @@ xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
- if (node == NULL)
- return(NULL);
-
-- prop = node->properties;
-+ if (nameSpace == NULL)
-+ return xmlGetProp(node, name);
-+
-+ if (node->type == XML_NAMESPACE_DECL)
-+ return(NULL);
-+ if (node->type == XML_ELEMENT_NODE)
-+ prop = node->properties;
-+ else
-+ prop = NULL;
- /*
- * TODO: Substitute xmlGetProp() for xmlGetNsProp(), since the former
- * is not namespace-aware and will return an attribute with equal
-@@ -183,8 +196,6 @@ xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
- * So this would return "myName" even if an attribute @name
- * in the XSLT was requested.
- */
-- if (nameSpace == NULL)
-- return(xmlGetProp(node, name));
- while (prop != NULL) {
- /*
- * One need to have
-@@ -217,7 +228,7 @@ xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nameSpace) {
- attrDecl = xmlGetDtdAttrDesc(doc->intSubset, node->name, name);
- if ((attrDecl == NULL) && (doc->extSubset != NULL))
- attrDecl = xmlGetDtdAttrDesc(doc->extSubset, node->name, name);
--
-+
- if ((attrDecl != NULL) && (attrDecl->prefix != NULL)) {
- /*
- * The DTD declaration only allows a prefix search
---
-1.7.12
-