cellog Fri, 31 Jul 2009 23:44:52 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=286603
Log:
fix segfault when running run-tests.php, and general potential for corruption
by calling php_stream_path_encode for unicode strings,
php_stream_path_param_encode decrements
the refcount, but never restores it, which can cause freeing of zvals before
they are done being used.
Changed paths:
U php/php-src/trunk/main/php_streams.h
Modified: php/php-src/trunk/main/php_streams.h
===================================================================
--- php/php-src/trunk/main/php_streams.h 2009-07-31 21:09:45 UTC (rev
286602)
+++ php/php-src/trunk/main/php_streams.h 2009-07-31 23:44:52 UTC (rev
286603)
@@ -422,6 +422,7 @@
if (FAILURE == php_stream_path_encode(NULL, &path, &path_len,
Z_USTRVAL_PP(ppzval), Z_USTRLEN_PP(ppzval), options, context)) {
return FAILURE;
}
+ Z_ADDREF_PP(ppzval); /* the conversion removes a refcount */
MAKE_STD_ZVAL(zpath);
ZVAL_STRINGL(zpath, path, path_len, 0);
Z_UNSET_ISREF_P(zpath);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php