helly           Mon Apr 10 23:23:09 2006 UTC

  Modified files:              (Branch: PHP_5_1)
    /php-src/ext/simplexml      simplexml.c 
  Log:
  - Coverity issue 59
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.20&r2=1.151.2.21&diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.20 
php-src/ext/simplexml/simplexml.c:1.151.2.21
--- php-src/ext/simplexml/simplexml.c:1.151.2.20        Mon Apr  3 14:59:30 2006
+++ php-src/ext/simplexml/simplexml.c   Mon Apr 10 23:23:09 2006
@@ -18,7 +18,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: simplexml.c,v 1.151.2.20 2006/04/03 14:59:30 tony2001 Exp $ */
+/* $Id: simplexml.c,v 1.151.2.21 2006/04/10 23:23:09 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -2107,6 +2107,9 @@
        if (intern != NULL && intern->node != NULL) {
                curnode = (xmlNodePtr)((php_libxml_node_ptr 
*)intern->node)->node;
        }
+       if (!curnode) {
+               return HASH_KEY_NON_EXISTANT;
+       }
 
        namelen = xmlStrlen(curnode->name);
        *str_key = estrndup(curnode->name, namelen);
@@ -2307,7 +2310,7 @@
 {
        php_info_print_table_start();
        php_info_print_table_header(2, "Simplexml support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.20 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.151.2.21 $");
        php_info_print_table_row(2, "Schema support",
 #ifdef LIBXML_SCHEMAS_ENABLED
                "enabled");

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

Reply via email to