mike Fri Feb 24 10:19:54 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/ext/dom domimplementation.c
/php-src NEWS
Log:
- fix crash with DOMImplementation::createDocumentType("name:")
http://cvs.php.net/viewcvs.cgi/php-src/ext/dom/domimplementation.c?r1=1.15.2.1&r2=1.15.2.2&diff_format=u
Index: php-src/ext/dom/domimplementation.c
diff -u php-src/ext/dom/domimplementation.c:1.15.2.1
php-src/ext/dom/domimplementation.c:1.15.2.2
--- php-src/ext/dom/domimplementation.c:1.15.2.1 Sun Jan 1 12:50:06 2006
+++ php-src/ext/dom/domimplementation.c Fri Feb 24 10:19:54 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: domimplementation.c,v 1.15.2.1 2006/01/01 12:50:06 sniper Exp $ */
+/* $Id: domimplementation.c,v 1.15.2.2 2006/02/24 10:19:54 mike Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -92,7 +92,7 @@
pch2 = systemid;
uri = xmlParseURI(name);
- if (uri->opaque != NULL) {
+ if (uri != NULL && uri->opaque != NULL) {
localname = xmlStrdup(uri->opaque);
if (xmlStrchr(localname, (xmlChar) ':') != NULL) {
php_dom_throw_error(NAMESPACE_ERR, 1 TSRMLS_CC);
@@ -108,7 +108,9 @@
php_dom_throw_error(INVALID_CHARACTER_ERR, TSRMLS_CC);
*/
- xmlFreeURI(uri);
+ if (uri) {
+ xmlFreeURI(uri);
+ }
doctype = xmlCreateIntSubset(NULL, localname, pch1, pch2);
xmlFree(localname);
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.425&r2=1.2027.2.426&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.425 php-src/NEWS:1.2027.2.426
--- php-src/NEWS:1.2027.2.425 Fri Feb 24 09:44:51 2006
+++ php-src/NEWS Fri Feb 24 10:19:54 2006
@@ -26,6 +26,7 @@
(Mike)
- Fixed tiger hash algorithm generating wrong results on big endian platforms.
(Mike)
+- Fixed crash with DOMImplementation::createDocumentType("name:"). (Mike)
- Fixed bug #36458 (sleep() accepts negative values). (Ilia)
- Fixed bug #36436 (DBA problem with Berkeley DB4). (Marcus)
- Fixed bug #36434 (Improper resolution of declaring class name of an inherited
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php