ports/108472: lang/php5: add patch which fixes bug #39350
Ralf vd Enden
tremere at cainites.net
Sun Jan 28 11:40:19 UTC 2007
>Number: 108472
>Category: ports
>Synopsis: lang/php5: add patch which fixes bug #39350
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Sun Jan 28 11:40:17 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Ralf vd Enden
>Release: FreeBSD 6.2-RELEASE i386
>Organization:
>Environment:
System: FreeBSD lan.cainites.net 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 16:52:24 CET 2007 root at lan.cainites.net:/usr/obj/usr/src/sys/HELLKERNEL i386
>Description:
Due to a bug in the implode function PHP can segfault. phpSysInfo 5.2.2 suffers from this bug. I've added a patch to fix bug #39350 which solves this issue.
>How-To-Repeat:
A code example can be found here: http://bugs.php.net/bug.php?id=39350
>Fix:
--- php5-5.2.0_1.diff begins here ---
diff -ruN php5/Makefile php5.new/Makefile
--- php5/Makefile Sun Jan 28 12:22:43 2007
+++ php5.new/Makefile Sun Jan 28 12:22:53 2007
@@ -7,7 +7,7 @@
PORTNAME= php5
PORTVERSION= 5.2.0
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP:S,$,:release,} \
http://downloads.php.net/ilia/:rc \
diff -ruN php5/files/patch-ext_standard_string.c php5.new/files/patch-ext_standard_string.c
--- php5/files/patch-ext_standard_string.c Thu Jan 1 01:00:00 1970
+++ php5.new/files/patch-ext_standard_string.c Sun Jan 28 12:21:41 2007
@@ -0,0 +1,16 @@
+--- ext/standard/string.c 2006/10/11 14:19:55 1.445.2.14.2.27
++++ ext/standard/string.c 2006/11/06 17:21:05 1.445.2.14.2.28
+@@ -955,7 +955,12 @@
+ }
+ smart_str_0(&implstr);
+
+- RETURN_STRINGL(implstr.c, implstr.len, 0);
++ if (implstr.len) {
++ RETURN_STRINGL(implstr.c, implstr.len, 0);
++ } else {
++ smart_str_free(&implstr);
++ RETURN_EMPTY_STRING();
++ }
+ }
+ /* }}} */
+
--- php5-5.2.0_1.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list