aboutsummaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
Diffstat (limited to 'lang')
-rw-r--r--lang/php5/Makefile4
-rw-r--r--lang/php5/files/patch-Zend_zend_alloc.c21
-rw-r--r--lang/php53/Makefile4
-rw-r--r--lang/php53/files/patch-Zend_zend_alloc.c21
4 files changed, 4 insertions, 46 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
index 955b663e68dc..e0d2013da065 100644
--- a/lang/php5/Makefile
+++ b/lang/php5/Makefile
@@ -43,7 +43,7 @@ OPTIONS= CLI "Build CLI version" on \
CGI "Build CGI version" on \
APACHE "Build Apache module" off \
DEBUG "Enable debug" off \
- SUHOSIN "Enable Suhosin protection system" off \
+ SUHOSIN "Enable Suhosin protection system" on \
MULTIBYTE "Enable zend multibyte support" off \
IPV6 "Enable ipv6 support" on \
REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
@@ -57,7 +57,7 @@ MAN1= php-config.1 phpize.1
.include <bsd.port.pre.mk>
-.if defined(WITH_SUHOSIN)
+.if !defined(WITHOUT_SUHOSIN)
PATCHFILES= suhosin-patch-${PORTVERSION}-0.9.5.patch.gz
PATCH_SITES= http://www.hardened-php.net/suhosin/_media/
PATCH_DIST_STRIP= -p1
diff --git a/lang/php5/files/patch-Zend_zend_alloc.c b/lang/php5/files/patch-Zend_zend_alloc.c
deleted file mode 100644
index 161fbf32757e..000000000000
--- a/lang/php5/files/patch-Zend_zend_alloc.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- Zend/zend_alloc.c 2006/08/10 17:16:24 1.144.2.4
-+++ Zend/zend_alloc.c 2006/09/30 17:15:23 1.144.2.5
-@@ -328,15 +328,14 @@
- ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
- {
- void *p;
-- int final_size = size*nmemb;
--
-+
- HANDLE_BLOCK_INTERRUPTIONS();
-- p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
-+ p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- if (!p) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
- return (void *) p;
- }
-- memset(p, 0, final_size);
-+ memset(p, 0, size * nmemb);
- HANDLE_UNBLOCK_INTERRUPTIONS();
- return p;
- }
diff --git a/lang/php53/Makefile b/lang/php53/Makefile
index 955b663e68dc..e0d2013da065 100644
--- a/lang/php53/Makefile
+++ b/lang/php53/Makefile
@@ -43,7 +43,7 @@ OPTIONS= CLI "Build CLI version" on \
CGI "Build CGI version" on \
APACHE "Build Apache module" off \
DEBUG "Enable debug" off \
- SUHOSIN "Enable Suhosin protection system" off \
+ SUHOSIN "Enable Suhosin protection system" on \
MULTIBYTE "Enable zend multibyte support" off \
IPV6 "Enable ipv6 support" on \
REDIRECT "Enable force-cgi-redirect support (CGI only)" off \
@@ -57,7 +57,7 @@ MAN1= php-config.1 phpize.1
.include <bsd.port.pre.mk>
-.if defined(WITH_SUHOSIN)
+.if !defined(WITHOUT_SUHOSIN)
PATCHFILES= suhosin-patch-${PORTVERSION}-0.9.5.patch.gz
PATCH_SITES= http://www.hardened-php.net/suhosin/_media/
PATCH_DIST_STRIP= -p1
diff --git a/lang/php53/files/patch-Zend_zend_alloc.c b/lang/php53/files/patch-Zend_zend_alloc.c
deleted file mode 100644
index 161fbf32757e..000000000000
--- a/lang/php53/files/patch-Zend_zend_alloc.c
+++ /dev/null
@@ -1,21 +0,0 @@
---- Zend/zend_alloc.c 2006/08/10 17:16:24 1.144.2.4
-+++ Zend/zend_alloc.c 2006/09/30 17:15:23 1.144.2.5
-@@ -328,15 +328,14 @@
- ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC)
- {
- void *p;
-- int final_size = size*nmemb;
--
-+
- HANDLE_BLOCK_INTERRUPTIONS();
-- p = _emalloc(final_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
-+ p = _safe_emalloc(nmemb, size, 0 ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
- if (!p) {
- HANDLE_UNBLOCK_INTERRUPTIONS();
- return (void *) p;
- }
-- memset(p, 0, final_size);
-+ memset(p, 0, size * nmemb);
- HANDLE_UNBLOCK_INTERRUPTIONS();
- return p;
- }