rrichards               Thu Dec 21 12:51:27 2006 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/dom    text.c domimplementation.c 
  Log:
  fix issues identitified by coverity
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.23.2.1&r2=1.23.2.1.2.1&diff_format=u
Index: php-src/ext/dom/text.c
diff -u php-src/ext/dom/text.c:1.23.2.1 php-src/ext/dom/text.c:1.23.2.1.2.1
--- php-src/ext/dom/text.c:1.23.2.1     Sun Jan  1 12:50:06 2006
+++ php-src/ext/dom/text.c      Thu Dec 21 12:51:26 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: text.c,v 1.23.2.1 2006/01/01 12:50:06 sniper Exp $ */
+/* $Id: text.c,v 1.23.2.1.2.1 2006/12/21 12:51:26 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -156,6 +156,10 @@
        xmlFree(first);
        xmlFree(second);
 
+       if (nnode == NULL) {
+               RETURN_FALSE;
+       }
+
        if (node->parent != NULL) {
                nnode->type = XML_ELEMENT_NODE;
                xmlAddNextSibling(node, nnode);
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domimplementation.c?r1=1.15.2.2&r2=1.15.2.2.2.1&diff_format=u
Index: php-src/ext/dom/domimplementation.c
diff -u php-src/ext/dom/domimplementation.c:1.15.2.2 
php-src/ext/dom/domimplementation.c:1.15.2.2.2.1
--- php-src/ext/dom/domimplementation.c:1.15.2.2        Fri Feb 24 10:19:54 2006
+++ php-src/ext/dom/domimplementation.c Thu Dec 21 12:51:26 2006
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: domimplementation.c,v 1.15.2.2 2006/02/24 10:19:54 mike Exp $ */
+/* $Id: domimplementation.c,v 1.15.2.2.2.1 2006/12/21 12:51:26 rrichards Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -115,6 +115,11 @@
        doctype = xmlCreateIntSubset(NULL, localname, pch1, pch2);
        xmlFree(localname);
 
+       if (doctype == NULL) {
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to create 
DocumentType");
+               RETURN_FALSE;
+       }
+
        DOM_RET_OBJ(rv, (xmlNodePtr) doctype, &ret, NULL);
 }
 /* }}} end dom_domimplementation_create_document_type */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to