tony2001 Thu Jun 11 09:49:57 2009 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/curl interface.c Log: MFH: fix bug #48518 (curl crashes when writing into invalid file handle) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1550&r2=1.2027.2.547.2.1551&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1550 php-src/NEWS:1.2027.2.547.2.1551 --- php-src/NEWS:1.2027.2.547.2.1550 Tue Jun 9 14:04:28 2009 +++ php-src/NEWS Thu Jun 11 09:49:57 2009 @@ -4,6 +4,7 @@ - Updated timezone database to version 2009.9 (2009i) (Derick) - Added "ignore_errors" option to http fopen wrapper. (David Zulke, Sara) +- Fixed bug #48518 (curl crashes when writing into invalid file handle). (Tony) - Fixed bug #48469 (ldap_get_entries() leaks memory on empty search results). (Patrick) - Fixed bug #48456 (CPPFLAGS not restored properly in phpize.m4). http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.54&r2=1.62.2.14.2.55&diff_format=u Index: php-src/ext/curl/interface.c diff -u php-src/ext/curl/interface.c:1.62.2.14.2.54 php-src/ext/curl/interface.c:1.62.2.14.2.55 --- php-src/ext/curl/interface.c:1.62.2.14.2.54 Wed Jun 10 11:10:19 2009 +++ php-src/ext/curl/interface.c Thu Jun 11 09:49:57 2009 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interface.c,v 1.62.2.14.2.54 2009/06/10 11:10:19 tony2001 Exp $ */ +/* $Id: interface.c,v 1.62.2.14.2.55 2009/06/11 09:49:57 tony2001 Exp $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -1437,6 +1437,7 @@ switch (option) { case CURLOPT_FILE: if (((php_stream *) what)->mode[0] != 'r') { + zend_list_addref(Z_LVAL_PP(zvalue)); ch->handlers->write->fp = fp; ch->handlers->write->method = PHP_CURL_FILE; } else { @@ -1447,6 +1448,7 @@ break; case CURLOPT_WRITEHEADER: if (((php_stream *) what)->mode[0] != 'r') { + zend_list_addref(Z_LVAL_PP(zvalue)); ch->handlers->write_header->fp = fp; ch->handlers->write_header->method = PHP_CURL_FILE; } else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php