jani Fri Nov 16 14:19:35 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/curl interface.c
Log:
MFH: - Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1013&r2=1.2027.2.547.2.1014&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1013 php-src/NEWS:1.2027.2.547.2.1014
--- php-src/NEWS:1.2027.2.547.2.1013 Fri Nov 16 12:28:34 2007
+++ php-src/NEWS Fri Nov 16 14:19:35 2007
@@ -1,8 +1,10 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2008, PHP 5.2.6
-- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is
invalid
- PHP expression and 'e' option is used). (Jani)
+- Fixed bug #43092 (curl_copy_handle() crashes with > 32 chars long URL).
+ (Jani)
+- Fixed bug #43301 (mb_ereg*_replace() crashes when replacement string is
+ invalid PHP expression and 'e' option is used). (Jani)
- Fixed bug #43293 (Multiple segfaults in getopt()). (Hannes)
- Fixed bug #43279 (pg_send_query_params() converts all elements in 'params'
to strings). (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.29&r2=1.62.2.14.2.30&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.29
php-src/ext/curl/interface.c:1.62.2.14.2.30
--- php-src/ext/curl/interface.c:1.62.2.14.2.29 Sat Oct 13 11:35:35 2007
+++ php-src/ext/curl/interface.c Fri Nov 16 14:19:35 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: interface.c,v 1.62.2.14.2.29 2007/10/13 11:35:35 bjori Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.30 2007/11/16 14:19:35 jani Exp $ */
#define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
@@ -1074,9 +1074,9 @@
memset(&(*ch)->err, 0, sizeof((*ch)->err));
- zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
(void(*)(void *)) curl_free_string, 0);
- zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
(void(*)(void *)) curl_free_slist, 0);
- zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost),
(void(*)(void *)) curl_free_post, 0);
+ zend_llist_init(&(*ch)->to_free.str, sizeof(char *),
(llist_dtor_func_t) curl_free_string, 0);
+ zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist),
(llist_dtor_func_t) curl_free_slist, 0);
+ zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost),
(llist_dtor_func_t) curl_free_post, 0);
}
/* }}} */
@@ -1204,6 +1204,8 @@
curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch);
zend_llist_copy(&dupch->to_free.str, &ch->to_free.str);
+ /* Don't try to free copied strings, they're free'd when the original
handle is destroyed */
+ dupch->to_free.str.dtor = NULL;
zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist);
zend_llist_copy(&dupch->to_free.post, &ch->to_free.post);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php