From 9312854b8ca6e595b8c51248fd612a496a724aa7 Mon Sep 17 00:00:00 2001 From: Alex Dupre Date: Thu, 15 Feb 2007 06:52:30 +0000 Subject: Fix a crashbug on str_replace(). Submitted by: esser Obtained from: PHP CVS --- lang/php53/Makefile | 2 +- lang/php53/files/patch-ext_standard_string.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lang/php53/files/patch-ext_standard_string.c (limited to 'lang/php53') 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) { -- cgit v1.2.3