tony2001 Wed Aug 2 09:16:53 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/session session.c
Log:
MFH: fix #38289 (segfault in session_decode() when _SESSION is NULL)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.174&r2=1.2027.2.547.2.175&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.174 php-src/NEWS:1.2027.2.547.2.175
--- php-src/NEWS:1.2027.2.547.2.174 Tue Aug 1 16:31:29 2006
+++ php-src/NEWS Wed Aug 2 09:16:52 2006
@@ -26,6 +26,8 @@
- Fixed phpinfo() cutoff of variables at \0. (Ilia)
- Fixed a bug in the filter extension that prevented magic_quotes_gpc from
being applied when RAW filter is used. (Ilia)
+- Fixed bug #38289 (segfault in session_decode() when _SESSION is NULL).
+ (Tony)
- Fixed bug #38278 (session_cache_expire()'s value does not match phpinfo's
session.cache_expire). (Tony)
- Fixed bug #38269 (fopen wrapper doesn't fail on invalid hostname with
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.9&r2=1.417.2.8.2.10&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.9
php-src/ext/session/session.c:1.417.2.8.2.10
--- php-src/ext/session/session.c:1.417.2.8.2.9 Tue Aug 1 08:32:07 2006
+++ php-src/ext/session/session.c Wed Aug 2 09:16:52 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: session.c,v 1.417.2.8.2.9 2006/08/01 08:32:07 tony2001 Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.10 2006/08/02 09:16:52 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -285,9 +285,13 @@
PHPAPI void php_add_session_var(char *name, size_t namelen TSRMLS_DC)
{
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.
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php