aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorale <ale@FreeBSD.org>2007-02-15 14:52:30 +0800
committerale <ale@FreeBSD.org>2007-02-15 14:52:30 +0800
commit47dd576ce270d8dd8fc5bad7b93a4b54854dd96b (patch)
tree79e64213a3e1e5c668bbc3f90501f17402f52599 /lang
parent88d0f18a4d781c0322271aa6c1b4a4c651fd19e8 (diff)
downloadfreebsd-ports-gnome-47dd576ce270d8dd8fc5bad7b93a4b54854dd96b.tar.gz
freebsd-ports-gnome-47dd576ce270d8dd8fc5bad7b93a4b54854dd96b.tar.zst
freebsd-ports-gnome-47dd576ce270d8dd8fc5bad7b93a4b54854dd96b.zip
Fix a crashbug on str_replace().
Submitted by: esser Obtained from: PHP CVS
Diffstat (limited to 'lang')
-rw-r--r--lang/php5/Makefile2
-rw-r--r--lang/php5/files/patch-ext_standard_string.c11
-rw-r--r--lang/php53/Makefile2
-rw-r--r--lang/php53/files/patch-ext_standard_string.c11
4 files changed, 24 insertions, 2 deletions
diff --git a/lang/php5/Makefile b/lang/php5/Makefile
index cfeed28af2ef..918c9af86528 100644
--- a/lang/php5/Makefile
+++ b/lang/php5/Makefile
@@ -7,7 +7,7 @@
PORTNAME= php5
PORTVERSION= 5.2.1
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \
http://downloads.php.net/ilia/:rc \
diff --git a/lang/php5/files/patch-ext_standard_string.c b/lang/php5/files/patch-ext_standard_string.c
new file mode 100644
index 000000000000..1bf5dc8377eb
--- /dev/null
+++ b/lang/php5/files/patch-ext_standard_string.c
@@ -0,0 +1,11 @@
+--- ext/standard/string.c.orig Thu Feb 15 07:50:09 2007
++++ ext/standard/string.c Thu Feb 15 07:50:33 2007
+@@ -3148,7 +3148,7 @@
+ }
+
+ Z_STRLEN_P(result) = len + (char_count * (to_len - 1));
+- Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len);
++ Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len + 1);
+ Z_TYPE_P(result) = IS_STRING;
+
+ if (case_sensitivity) {
diff --git a/lang/php53/Makefile b/lang/php53/Makefile
index cfeed28af2ef..918c9af86528 100644
--- a/lang/php53/Makefile
+++ b/lang/php53/Makefile
@@ -7,7 +7,7 @@
PORTNAME= php5
PORTVERSION= 5.2.1
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \
http://downloads.php.net/ilia/:rc \
diff --git a/lang/php53/files/patch-ext_standard_string.c b/lang/php53/files/patch-ext_standard_string.c
new file mode 100644
index 000000000000..1bf5dc8377eb
--- /dev/null
+++ b/lang/php53/files/patch-ext_standard_string.c
@@ -0,0 +1,11 @@
+--- ext/standard/string.c.orig Thu Feb 15 07:50:09 2007
++++ ext/standard/string.c Thu Feb 15 07:50:33 2007
+@@ -3148,7 +3148,7 @@
+ }
+
+ Z_STRLEN_P(result) = len + (char_count * (to_len - 1));
+- Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len);
++ Z_STRVAL_P(result) = target = safe_emalloc(char_count, to_len, len + 1);
+ Z_TYPE_P(result) = IS_STRING;
+
+ if (case_sensitivity) {