]> granicus.if.org Git - php/commitdiff
no message
authorRob Richards <rrichards@php.net>
Fri, 25 Feb 2005 22:13:37 +0000 (22:13 +0000)
committerRob Richards <rrichards@php.net>
Fri, 25 Feb 2005 22:13:37 +0000 (22:13 +0000)
NEWS
ext/domxml/php_domxml.c

diff --git a/NEWS b/NEWS
index f9576a2a2fab1d0b78ac5ea76b05a6a75a91361f..09d301869245db1562509798a5f5925a7278d037 100644 (file)
--- 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)
index 35b473c9f18c178686650352b6ca377d8d3923f3..f357733435a9852f2446d901d1e74f57bfde81d5 100644 (file)
@@ -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;