andrei Fri Feb 3 21:53:05 2006 UTC Modified files: /php-src/ext/unicode unicode_iterators.c Log: Guard against assign-by-ref. http://cvs.php.net/viewcvs.cgi/php-src/ext/unicode/unicode_iterators.c?r1=1.5&r2=1.6&diff_format=u Index: php-src/ext/unicode/unicode_iterators.c diff -u php-src/ext/unicode/unicode_iterators.c:1.5 php-src/ext/unicode/unicode_iterators.c:1.6 --- php-src/ext/unicode/unicode_iterators.c:1.5 Fri Feb 3 00:09:19 2006 +++ php-src/ext/unicode/unicode_iterators.c Fri Feb 3 21:53:05 2006 @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unicode_iterators.c,v 1.5 2006/02/03 00:09:19 andrei Exp $ */ +/* $Id: unicode_iterators.c,v 1.6 2006/02/03 21:53:05 andrei Exp $ */ #include "php.h" @@ -169,6 +169,7 @@ if (intern->text) { efree(intern->text); } + ZVAL_DELREF(intern->current); zval_ptr_dtor(&intern->current); efree(object); } @@ -191,6 +192,7 @@ MAKE_STD_ZVAL(intern->current); /* pre-allocate buffer for codepoint */ Z_USTRVAL_P(intern->current) = eumalloc(3); Z_TYPE_P(intern->current) = IS_UNICODE; + ZVAL_ADDREF(intern->current); retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) text_iterator_free_storage, NULL TSRMLS_CC); retval.handlers = zend_get_std_object_handlers();
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php