chregu Fri Oct 8 10:53:39 2004 EDT Modified files: (Branch: PHP_5_0) /php-src NEWS /php-src/main/streams userspace.c Log: MFH Fixed bug #27183 (Userland stream wrapper segfaults on stream_write). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1760.2.96&r2=1.1760.2.97&ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1760.2.96 php-src/NEWS:1.1760.2.97 --- php-src/NEWS:1.1760.2.96 Fri Oct 8 10:46:47 2004 +++ php-src/NEWS Fri Oct 8 10:53:39 2004 @@ -22,6 +22,8 @@ characters). (Moriyoshi) - Fixed bug #27798 (private / protected variables not exposed by get_object_vars() inside class). (Marcus) +- Fixed bug #27183 (Userland stream wrapper segfaults on stream_write). + (Christian) 23 Sep 2004, PHP 5.0.2 - Added new boolean (fourth) parameter to array_slice() that turns on the http://cvs.php.net/diff.php/php-src/main/streams/userspace.c?r1=1.26&r2=1.26.2.1&ty=u Index: php-src/main/streams/userspace.c diff -u php-src/main/streams/userspace.c:1.26 php-src/main/streams/userspace.c:1.26.2.1 --- php-src/main/streams/userspace.c:1.26 Mon Jun 21 14:58:55 2004 +++ php-src/main/streams/userspace.c Fri Oct 8 10:53:39 2004 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userspace.c,v 1.26 2004/06/21 18:58:55 pollita Exp $ */ +/* $Id: userspace.c,v 1.26.2.1 2004/10/08 14:53:39 chregu Exp $ */ #include "php.h" #include "php_globals.h" @@ -445,15 +445,15 @@ int call_result; php_userstream_data_t *us = (php_userstream_data_t *)stream->abstract; zval **args[1]; - zval zbuff, *zbufptr; + zval *zbufptr; size_t didwrite = 0; assert(us != NULL); ZVAL_STRINGL(&func_name, USERSTREAM_WRITE, sizeof(USERSTREAM_WRITE)-1, 0); - ZVAL_STRINGL(&zbuff, (char*)buf, count, 0); - zbufptr = &zbuff; + MAKE_STD_ZVAL(zbufptr); + ZVAL_STRINGL(zbufptr, (char*)buf, count, 1);; args[0] = &zbufptr; call_result = call_user_function_ex(NULL, @@ -463,6 +463,8 @@ 1, args, 0, NULL TSRMLS_CC); + zval_ptr_dtor(&zbufptr); + didwrite = 0; if (call_result == SUCCESS && retval != NULL) { convert_to_long(retval);
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php