FreeBSD Bugzilla – Attachment 75772 Details for
Bug 109372
[PATCH] for www/php4-session which fixes php 4.4.5 segfault when register_globals=on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
php4-session.patch
php4-session.patch (text/plain), 2.04 KB, created by
Alexander Zhuravlev
on 2007-02-20 20:50:14 UTC
(
hide
)
Description:
php4-session.patch
Filename:
MIME Type:
Creator:
Alexander Zhuravlev
Created:
2007-02-20 20:50:14 UTC
Size:
2.04 KB
patch
obsolete
>diff -urbBN php4-session.orig/Makefile php4-session/Makefile >--- php4-session.orig/Makefile Mon Jul 19 12:41:18 2004 >+++ php4-session/Makefile Tue Feb 20 22:48:41 2007 >@@ -5,6 +5,8 @@ > # $FreeBSD: ports/www/php4-session/Makefile,v 1.1 2004/07/19 08:41:18 ale Exp $ > # > >+PORTREVISION=1 >+ > CATEGORIES= www > > MASTERDIR= ${.CURDIR}/../../lang/php4 >diff -urbBN php4-session.orig/files/patch-session_segfault.diff php4-session/files/patch-session_segfault.diff >--- php4-session.orig/files/patch-session_segfault.diff Thu Jan 1 03:00:00 1970 >+++ php4-session/files/patch-session_segfault.diff Tue Feb 20 22:37:03 2007 >@@ -0,0 +1,43 @@ >+Index: ext/session/session.c >+--- session.c 2007/01/09 15:31:36 1.336.2.53.2.13 >++++ session.c 2007/02/15 09:41:30 1.336.2.53.2.14 >+@@ -17,7 +17,7 @@ >+ +----------------------------------------------------------------------+ >+ */ >+ >+-/* $Id: session.c,v 1.336.2.53.2.13 2007/01/09 15:31:36 iliaa Exp $ */ >++/* $Id: session.c,v 1.336.2.53.2.14 2007/02/15 09:41:30 tony2001 Exp $ */ >+ >+ #ifdef HAVE_CONFIG_H >+ #include "config.h" >+@@ -271,8 +271,12 @@ >+ { >+ zval **sym_track = NULL; >+ >+- zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1, >+- (void *) &sym_track); >++ IF_SESSION_VARS() { >++ zend_hash_find(Z_ARRVAL_P(PS(http_session_vars)), name, namelen + 1, >++ (void *) &sym_track); >++ } else { >++ return; >++ } >+ >+ /* >+ * Set up a proper reference between $_SESSION["x"] and $x. >+@@ -281,11 +285,10 @@ >+ if (PG(register_globals)) { >+ zval **sym_global = NULL; >+ >+- zend_hash_find(&EG(symbol_table), name, namelen + 1, >+- (void *) &sym_global); >+- >+- if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) { >+- return; >++ if (zend_hash_find(&EG(symbol_table), name, namelen + 1, (void *) &sym_global) == SUCCESS) { >++ if ((Z_TYPE_PP(sym_global) == IS_ARRAY && Z_ARRVAL_PP(sym_global) == &EG(symbol_table)) || *sym_global == PS(http_session_vars)) { >++ return; >++ } >+ } >+ >+ if (sym_global == NULL && sym_track == NULL) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 109372
: 75772