[Pkg-php-commits] [php/debian-sid] cherry-pick relevant gentoo patches from unstable

Raphael Geissert atomo64 at gmail.com
Sun Feb 7 23:19:17 UTC 2010


note that the patches which are already fixed upstream have been rebased
out of the cherry-picked patchset for experimental.

debian/patches/gentoo/006_ext-curl-set_opt-crash.patch:

  006_ext-curl-set_opt-crash.patch
  PHP_5_2
  http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.42&r2=1.62.2.14.2.43&diff_format=u
  http://bugs.php.net/bug.php?id=47616
  Fixed bug #47616 (curl keeps crashing)

debian/patches/gentoo/009_ob-memory-leaks.patch:

  009_ob-memory-leaks.patch
  PHP_5_2
  http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.8&r2=1.167.2.3.2.9&diff_format=u
  Fixed memory leak in ob_get_clean/ob_get_flush.
---
 .../gentoo/006_ext-curl-set_opt-crash.patch        |   16 +++++++++
 debian/patches/gentoo/009_ob-memory-leaks.patch    |   34 ++++++++++++++++++++
 debian/patches/series                              |    2 +
 3 files changed, 52 insertions(+), 0 deletions(-)
 create mode 100644 debian/patches/gentoo/006_ext-curl-set_opt-crash.patch
 create mode 100644 debian/patches/gentoo/009_ob-memory-leaks.patch

diff --git a/debian/patches/gentoo/006_ext-curl-set_opt-crash.patch b/debian/patches/gentoo/006_ext-curl-set_opt-crash.patch
new file mode 100644
index 0000000..eb38dcc
--- /dev/null
+++ b/debian/patches/gentoo/006_ext-curl-set_opt-crash.patch
@@ -0,0 +1,16 @@
+006_ext-curl-set_opt-crash.patch
+PHP_5_2
+http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.42&r2=1.62.2.14.2.43&diff_format=u
+http://bugs.php.net/bug.php?id=47616
+Fixed bug #47616 (curl keeps crashing)
+diff -r 9db107056020 -r 85ef4c1844f0 ext/curl/interface.c
+--- a/ext/curl/interface.c	Fri Apr 10 11:25:01 2009 +0200
++++ b/ext/curl/interface.c	Fri Apr 10 11:29:41 2009 +0200
+@@ -1550,6 +1550,7 @@
+ 			} else {
+ #if LIBCURL_VERSION_NUM >= 0x071101
+ 				/* with curl 7.17.0 and later, we can use COPYPOSTFIELDS, but we have to provide size before */
++				convert_to_string_ex(zvalue);
+ 				error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue));
+ 				error = curl_easy_setopt(ch->cp, CURLOPT_COPYPOSTFIELDS, Z_STRVAL_PP(zvalue));
+ #else
diff --git a/debian/patches/gentoo/009_ob-memory-leaks.patch b/debian/patches/gentoo/009_ob-memory-leaks.patch
new file mode 100644
index 0000000..d8338ab
--- /dev/null
+++ b/debian/patches/gentoo/009_ob-memory-leaks.patch
@@ -0,0 +1,34 @@
+009_ob-memory-leaks.patch
+PHP_5_2
+http://cvs.php.net/viewvc.cgi/php-src/main/output.c?r1=1.167.2.3.2.8&r2=1.167.2.3.2.9&diff_format=u
+Fixed memory leak in ob_get_clean/ob_get_flush.
+
+diff -r f5a102df944d -r e2602e8d2936 main/output.c
+--- a/main/output.c	Fri Apr 10 11:35:06 2009 +0200
++++ b/main/output.c	Fri Apr 10 11:37:31 2009 +0200
+@@ -855,10 +855,12 @@
+ 	/* error checks */
+ 	if (!OG(ob_nesting_level)) {
+ 		php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete and flush buffer. No buffer to delete or flush.");
++		zval_dtor(return_value);
+ 		RETURN_FALSE;
+ 	}
+ 	if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
+ 		php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
++		zval_dtor(return_value);
+ 		RETURN_FALSE;
+ 	}
+ 	/* flush */
+@@ -880,10 +882,12 @@
+ 	/* error checks */
+ 	if (!OG(ob_nesting_level)) {
+ 		php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer. No buffer to delete.");
++		zval_dtor(return_value);
+ 		RETURN_FALSE;
+ 	}
+ 	if (OG(ob_nesting_level) && !OG(active_ob_buffer).status && !OG(active_ob_buffer).erase) {
+ 		php_error_docref("ref.outcontrol" TSRMLS_CC, E_NOTICE, "failed to delete buffer %s.", OG(active_ob_buffer).handler_name);
++		zval_dtor(return_value);
+ 		RETURN_FALSE;
+ 	}
+ 	/* delete buffer */
diff --git a/debian/patches/series b/debian/patches/series
index 382e2ef..38039dd 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -28,3 +28,5 @@ manpage_spelling.patch
 force_libmysqlclient_r.patch
 libedit_is_editline.patch
 bad_whatis_entries.patch
+gentoo/006_ext-curl-set_opt-crash.patch
+gentoo/009_ob-memory-leaks.patch
-- 
1.6.3.3





More information about the Pkg-php-commits mailing list