From ed3db800b6de4989b279b8ff864901f04faab10d Mon Sep 17 00:00:00 2001 From: Rob Richards Date: Fri, 25 Feb 2005 22:13:37 +0000 Subject: [PATCH] no message --- NEWS | 1 + ext/domxml/php_domxml.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS b/NEWS index f9576a2a2f..09d3018692 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ PHP 4 NEWS - Added Oracle Instant Client support. (cjbj at hotmail dot com, Tony) - Changed phpize not to require libtool. (Jani) - Updated bundled libmbfl library (used for multibyte functions). (Moriyoshi) +- Fixed bug #32114 (DOM crashing when attribute appended to Document). (Rob) Fixed bugs: . Bug #32063 (mb_convert_encoding ignores named entity 'alpha') . Bug #31911 (mb_decode_mimeheader() is case-sensitive to hex escapes) diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index 35b473c9f1..f357733435 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -2471,6 +2471,10 @@ PHP_FUNCTION(domxml_node_append_child) } /* end libxml2 code */ else if (child->type == XML_ATTRIBUTE_NODE) { + if (parent->type != XML_ELEMENT_NODE) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Element node required to append Attribute"); + RETURN_FALSE; + } if (parent->properties != NULL) { /* Check if an attribute with the same name exists */ xmlAttrPtr foundattrp; -- 2.40.0