summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-lang/php/Manifest4
-rw-r--r--dev-lang/php/files/5.2.17/bug-60986-replace-deprecated-pcre_info.diff55
-rw-r--r--dev-lang/php/files/5.2.17/bug-60986-safer-pcre_fullinfo.diff33
-rw-r--r--dev-lang/php/php-5.2.17.ebuild7
4 files changed, 97 insertions, 2 deletions
diff --git a/dev-lang/php/Manifest b/dev-lang/php/Manifest
index 40246ab6..48321954 100644
--- a/dev-lang/php/Manifest
+++ b/dev-lang/php/Manifest
@@ -1,4 +1,6 @@
AUX 20php5-envd 145 RMD160 8c81fb7dc1d1ddf16fd956d748514db3bcb27603 SHA1 f1cef57c0def8e2c5422aaf136f40b4ff47801d2 SHA256 efaae9e6ae5f7010e073c2ab6d8a9dda009f0707c7d7b0c027e142c94f7041a4
+AUX 5.2.17/bug-60986-replace-deprecated-pcre_info.diff 1983 RMD160 3aa7a624b0b55130880c72f88695ca04b92526e9 SHA1 ca31815dacd3af0fc0e048dc850c271b61eb6318 SHA256 c4ca67e8abb589fe22068e07f9dec26da1b04dc52234a934d75889eb27a83107
+AUX 5.2.17/bug-60986-safer-pcre_fullinfo.diff 1239 RMD160 77638cdad2126a42b39cb79ed846ba1291bcfb44 SHA1 020136c2a0a2399418e3890258de3a1cd1199135 SHA256 08f3bf9d79ed4ca9ab5f60062be1d83c9b6d441e99c59332956d465dcae6aed1
AUX 70_mod_php5.conf-apache2 348 RMD160 9f3f49a52ebf92c2650501c5ceb6f95ce4bb2e76 SHA1 62992e793446b4a9a64900d1ecba7bae06873382 SHA256 5bb8a45570582b4389a7d3feea0398e1c13ed4ced96e559b9406ed8c965dea8c
AUX eblits/common-v2.eblit 379 RMD160 595fd6c6be1e0ac15012ea78497a4d2c287c6754 SHA1 98e28261e32bda53c7dfef88def615f633af7c44 SHA256 8c15442b04b0216342ef6f2b8565cb3510f6850fe67745d5697861e2f7759194
AUX eblits/src_compile-v1.eblit 1283 RMD160 83fbb374e2dfaa9d164e6b32b57c268ed06bf519 SHA1 09124cbc9008bfb72eb24cd24b2319d22df52c2c SHA256 5ec76ae24304c5f803a615a98394c219018da1b1ce2018f92f6ac8c5becf6c99
@@ -8,4 +10,4 @@ AUX eblits/src_prepare-v2.eblit 2604 RMD160 379dbca3e2ae8c1f09f608220ec9c98d099c
DIST php-5.2.17.tar.bz2 9092312 RMD160 567fa8d718b93fb83a89494c83a8bec224ac99e9 SHA1 d68f3b09f766990d815a3c4c63c157db8dab8095 SHA256 e81beb13ec242ab700e56f366e9da52fd6cf18961d155b23304ca870e53f116c
DIST php-patchset-5.2.17-r0.tar.bz2 8369 RMD160 544af4eb2de8e4478e675810f18a5b494b59709b SHA1 7b3c56437b435f60f72f7af08112e77c01e2f827 SHA256 fb159a02faf5120dd9bc620bd3f3094735f181aa6893273bb7dd29771b8b23b2
DIST suhosin-patch-5.2.16-0.9.7.patch.gz 23069 RMD160 b28b70faf136b3e04c5b483da0f4c2279378f43a SHA1 fec10b2b81582d06bb0d0a96ea55c525afc8ab29 SHA256 aae115a318d80b3f32cedf876e7a8e4b932febb1b0c743c0b398003ebe122f91
-EBUILD php-5.2.17.ebuild 11400 RMD160 442ce96fc819167fe093b1ff754da17b98812805 SHA1 e808e9b24dcfee8f75e8ea465b964a965151f513 SHA256 1e82c08f4348f02817a0932030ecfaa741de1933edda9e884042b9a83aa6b267
+EBUILD php-5.2.17.ebuild 11535 RMD160 1631461ac63a41699316c88bece1ab1d3cd8232a SHA1 12f6ec5209044903bbc780054f66443da47a541d SHA256 e7293b8d08b68f54a9a92a469d812584e5570bd638173eef91b8e0793e681c60
diff --git a/dev-lang/php/files/5.2.17/bug-60986-replace-deprecated-pcre_info.diff b/dev-lang/php/files/5.2.17/bug-60986-replace-deprecated-pcre_info.diff
new file mode 100644
index 00000000..0c28f5a7
--- /dev/null
+++ b/dev-lang/php/files/5.2.17/bug-60986-replace-deprecated-pcre_info.diff
@@ -0,0 +1,55 @@
+From 704c45ec3edeab16b46fbac3b81947577d185970 Mon Sep 17 00:00:00 2001
+From: Rasmus Lerdorf <rasmus@php.net>
+Date: Mon, 6 Feb 2012 18:11:56 +0000
+Subject: [PATCH] Fix for bug 60986
+
+---
+ ext/pcre/php_pcre.c | 4 ++--
+ ext/pcre/php_pcre.def | 1 -
+ main/php_compat.h | 1 -
+ 3 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
+index 1741843..fc96ef6 100644
+--- a/ext/pcre/php_pcre.c
++++ b/ext/pcre/php_pcre.c
+@@ -252,10 +252,10 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
+ back the compiled pattern, otherwise go on and compile it. */
+ if (zend_hash_find(&PCRE_G(pcre_cache), regex, regex_len+1, (void **)&pce) == SUCCESS) {
+ /*
+- * We use a quick pcre_info() check to see whether cache is corrupted, and if it
++ * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
+ * is, we flush it and compile the pattern from scratch.
+ */
+- if (pcre_info(pce->re, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
++ if (pcre_fullinfo(pce->re, NULL, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
+ zend_hash_clean(&PCRE_G(pcre_cache));
+ } else {
+ #if HAVE_SETLOCALE
+diff --git a/ext/pcre/php_pcre.def b/ext/pcre/php_pcre.def
+index 0e49897..769b064 100644
+--- a/ext/pcre/php_pcre.def
++++ b/ext/pcre/php_pcre.def
+@@ -4,7 +4,6 @@ php_pcre_copy_substring
+ php_pcre_exec
+ php_pcre_get_substring
+ php_pcre_get_substring_list
+-php_pcre_info
+ php_pcre_maketables
+ php_pcre_study
+ php_pcre_version
+diff --git a/main/php_compat.h b/main/php_compat.h
+index 0163844..80f43d4 100644
+--- a/main/php_compat.h
++++ b/main/php_compat.h
+@@ -34,7 +34,6 @@
+ #define pcre_exec php_pcre_exec
+ #define pcre_get_substring php_pcre_get_substring
+ #define pcre_get_substring_list php_pcre_get_substring_list
+-#define pcre_info php_pcre_info
+ #define pcre_maketables php_pcre_maketables
+ #define pcre_study php_pcre_study
+ #define pcre_version php_pcre_version
+--
+1.7.8.6
+
diff --git a/dev-lang/php/files/5.2.17/bug-60986-safer-pcre_fullinfo.diff b/dev-lang/php/files/5.2.17/bug-60986-safer-pcre_fullinfo.diff
new file mode 100644
index 00000000..67484703
--- /dev/null
+++ b/dev-lang/php/files/5.2.17/bug-60986-safer-pcre_fullinfo.diff
@@ -0,0 +1,33 @@
+From c950030b3f07a05fd00fa894ca573f7746e82367 Mon Sep 17 00:00:00 2001
+From: Rasmus Lerdorf <rasmus@php.net>
+Date: Mon, 6 Feb 2012 18:18:53 +0000
+Subject: [PATCH] Safer way to call pcre_fullinfo - bug 60986
+
+---
+ ext/pcre/php_pcre.c | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c
+index fc96ef6..c9d7072 100644
+--- a/ext/pcre/php_pcre.c
++++ b/ext/pcre/php_pcre.c
+@@ -241,6 +241,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
+ char *pattern;
+ int do_study = 0;
+ int poptions = 0;
++ int count = 0;
+ unsigned const char *tables = NULL;
+ #if HAVE_SETLOCALE
+ char *locale = setlocale(LC_CTYPE, NULL);
+@@ -255,7 +256,7 @@ PHPAPI pcre_cache_entry* pcre_get_compiled_regex_cache(char *regex, int regex_le
+ * We use a quick pcre_fullinfo() check to see whether cache is corrupted, and if it
+ * is, we flush it and compile the pattern from scratch.
+ */
+- if (pcre_fullinfo(pce->re, NULL, NULL, NULL) == PCRE_ERROR_BADMAGIC) {
++ if (pcre_fullinfo(pce->re, NULL, PCRE_INFO_CAPTURECOUNT, &count) == PCRE_ERROR_BADMAGIC) {
+ zend_hash_clean(&PCRE_G(pcre_cache));
+ } else {
+ #if HAVE_SETLOCALE
+--
+1.7.8.6
+
diff --git a/dev-lang/php/php-5.2.17.ebuild b/dev-lang/php/php-5.2.17.ebuild
index 81ac6bd2..9c5e84fb 100644
--- a/dev-lang/php/php-5.2.17.ebuild
+++ b/dev-lang/php/php-5.2.17.ebuild
@@ -323,7 +323,12 @@ eblit-pkg() {
eblit-pkg pkg_setup v2
-src_prepare() { eblit-run src_prepare v2 ; }
+src_prepare() {
+ epatch "${FILESDIR}"/${PV}/bug-60986-replace-deprecated-pcre_info.diff
+ epatch "${FILESDIR}"/${PV}/bug-60986-safer-pcre_fullinfo.diff
+
+ eblit-run src_prepare v2
+}
src_configure() { eblit-run src_configure v521 ; }
src_compile() { eblit-run src_compile v1 ; }
src_install() { eblit-run src_install v2 ; }