ports/120204: [patch] fix crash for lang/php5
Daniel Gerzo
danger at FreeBSD.org
Fri Feb 1 13:50:01 UTC 2008
>Number: 120204
>Category: ports
>Synopsis: [patch] fix crash for lang/php5
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 01 13:50:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Daniel Gerzo
>Release: FreeBSD 6.2-STABLE i386
>Organization:
The FreeBSD Project
>Environment:
FreeBSD 6.2-STABLE #1: Thu Sep 13 19:21:16 CEST 2007
>Description:
Add the distribution patch (Revision 1.202.2.7.2.16) with the following log:
Fixed crash because of uninitialized SG(sapi_headers).mimetype
>How-To-Repeat:
I don't know the exact scenario, but I have triggered it on my machines.
>Fix:
--- php5.diff begins here ---
diff -ruN php5.orig/Makefile php5/Makefile
--- php5.orig/Makefile 2008-01-29 11:14:36.000000000 +0100
+++ php5/Makefile 2008-02-01 14:22:36.000000000 +0100
@@ -7,7 +7,7 @@
PORTNAME= php5
PORTVERSION= 5.2.5
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES?= lang devel www
MASTER_SITES= ${MASTER_SITE_PHP}
MASTER_SITE_SUBDIR= distributions
diff -ruN php5.orig/files/patch-main_SAPI.c php5/files/patch-main_SAPI.c
--- php5.orig/files/patch-main_SAPI.c 2006-05-06 15:26:47.000000000 +0200
+++ php5/files/patch-main_SAPI.c 2008-02-01 14:37:27.000000000 +0100
@@ -1,6 +1,31 @@
---- main/SAPI.c.orig Sun Jan 1 13:50:17 2006
-+++ main/SAPI.c Wed May 3 09:38:09 2006
-@@ -602,7 +602,7 @@
+--- main/SAPI.c.orig 2007-05-25 11:20:01.000000000 +0200
++++ main/SAPI.c 2008-02-01 14:36:51.000000000 +0100
+@@ -18,7 +18,7 @@
+ +----------------------------------------------------------------------+
+ */
+
+-/* $Id: SAPI.c,v 1.202.2.7.2.15 2007/05/25 09:20:01 rasmus Exp $ */
++/* $Id: SAPI.c,v 1.202.2.7.2.16 2007/12/03 16:04:26 dmitry Exp $ */
+
+ #include <ctype.h>
+ #include <sys/stat.h>
+@@ -301,6 +301,7 @@
+
+ /* SG(sapi_headers).http_response_code = 200; */
+ SG(sapi_headers).http_status_line = NULL;
++ SG(sapi_headers).mimetype = NULL;
+ SG(read_post_bytes) = 0;
+ SG(request_info).post_data = NULL;
+ SG(request_info).raw_post_data = NULL;
+@@ -340,6 +341,7 @@
+ SG(sapi_headers).http_response_code = 200;
+ */
+ SG(sapi_headers).http_status_line = NULL;
++ SG(sapi_headers).mimetype = NULL;
+ SG(headers_sent) = 0;
+ SG(read_post_bytes) = 0;
+ SG(request_info).post_data = NULL;
+@@ -604,7 +606,7 @@
ptr++;
len--;
}
@@ -9,7 +34,7 @@
if(!strncmp(ptr, "image/", sizeof("image/")-1)) {
zend_alter_ini_entry("zlib.output_compression", sizeof("zlib.output_compression"), "0", sizeof("0") - 1, PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
}
-@@ -756,7 +756,7 @@
+@@ -758,7 +760,7 @@
return SUCCESS;
}
--- php5.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list