cvs: php4 /ext/domxml php_domxml.c

From: Date: Fri, 12 Jan 2001 16:49:07 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-3575@lists.php.net to get a copy of this message
sniper Fri Jan 12 08:49:07 2001 EDT Modified files: /php4/ext/domxml php_domxml.c Log: - Fixed a possible crash bug in xmltree(). # PR: #7052 Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.24 php4/ext/domxml/php_domxml.c:1.25 --- php4/ext/domxml/php_domxml.c:1.24 Fri Jan 5 06:34:15 2001 +++ php4/ext/domxml/php_domxml.c Fri Jan 12 08:49:06 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.24 2001/01/05 14:34:15 andi Exp $ */ +/* $Id: php_domxml.c,v 1.25 2001/01/12 16:49:06 sniper Exp $ */ #include "php.h" @@ -1406,8 +1406,10 @@ zend_hash_next_index_insert((*children)->value.ht, &child, sizeof(zval *), NULL); /* Add name, content and type as properties */ - add_property_stringl(child, "name", (char *) last->name, strlen(last->name), 1); - add_property_long(child, "type", last->type); + if(last->name) + add_property_stringl(child, "name", (char *) last->name, strlen(last->name), 1); + if(last->type) + add_property_long(child, "type", last->type); content = xmlNodeGetContent(last); if(content) add_property_stringl(child, "content", (char *) content, strlen(content), 1);

« previous php.cvs (#3575) next »