[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2009-04-06 Thread Hannes Magnusson
bjori   Mon Apr  6 11:45:25 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  MFH: fix folding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.20r2=1.417.2.8.2.40.2.21diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.20 
php-src/ext/session/session.c:1.417.2.8.2.40.2.21
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.20   Wed Dec 31 11:15:42 2008
+++ php-src/ext/session/session.c   Mon Apr  6 11:45:25 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.20 2008/12/31 11:15:42 sebastian Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.21 2009/04/06 11:45:25 bjori Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -770,7 +770,7 @@
return SUCCESS;
}
 }
-#endif /* HAVE_HASH_EXT */
+#endif /* HAVE_HASH_EXT }}} */
 
return FAILURE;
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-12-10 Thread Scott MacVicar
scottmacThu Dec 11 01:21:36 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  MFH Fix bug #35975 - Session cookie expires date format isn't the most 
compatible. Sync to that of setcookie().
  
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.18r2=1.417.2.8.2.40.2.19diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.18 
php-src/ext/session/session.c:1.417.2.8.2.40.2.19
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.18   Tue Dec  9 14:03:58 2008
+++ php-src/ext/session/session.c   Thu Dec 11 01:21:35 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.18 2008/12/09 14:03:58 bjori Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.19 2008/12/11 01:21:35 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -40,7 +40,7 @@
 #include ext/standard/md5.h
 #include ext/standard/sha1.h
 #include ext/standard/php_var.h
-#include ext/standard/datetime.h
+#include ext/date/php_date.h
 #include ext/standard/php_lcg.h
 #include ext/standard/url_scanner_ex.h
 #include ext/standard/php_rand.h /* for RAND_MAX */
@@ -1257,7 +1257,7 @@
t = tv.tv_sec + PS(cookie_lifetime);
 
if (t  0) {
-   date_fmt = php_std_date(t TSRMLS_CC);
+   date_fmt = php_format_date(D, d-M-Y H:i:s T, 
sizeof(D, d-M-Y H:i:s T)-1, t, 0 TSRMLS_CC);
smart_str_appends(ncookie, COOKIE_EXPIRES);
smart_str_appends(ncookie, date_fmt);
efree(date_fmt);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-08-05 Thread Jani Taskinen
janiTue Aug  5 22:52:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  - Nuke ending periods from error messages
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.12r2=1.417.2.8.2.40.2.13diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.12 
php-src/ext/session/session.c:1.417.2.8.2.40.2.13
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.12   Mon Aug  4 06:21:55 2008
+++ php-src/ext/session/session.c   Tue Aug  5 22:52:05 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.12 2008/08/04 06:21:55 kalle Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.13 2008/08/05 22:52:05 jani Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -168,7 +168,7 @@
 
 #define SESSION_CHECK_ACTIVE_STATE \
if (PS(session_status) == php_session_active) { \
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, A session is 
active. You cannot change the session module's ini settings at this time.);  \
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, A session is 
active. You cannot change the session module's ini settings at this time);   \
return FAILURE; \
}   \
 
@@ -714,13 +714,13 @@
 
IF_SESSION_VARS() {
if (!PS(serializer)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
session.serialize_handler. Failed to encode session object.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
session.serialize_handler. Failed to encode session object);
ret = NULL;
}
else if (PS(serializer)-encode(ret, newlen TSRMLS_CC) == 
FAILURE)
ret = NULL;
} else {
-php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot encode 
non-existent session.);
+php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot encode 
non-existent session);
}
 
return ret;
@@ -729,12 +729,12 @@
 static void php_session_decode(const char *val, int vallen TSRMLS_DC)
 {
if (!PS(serializer)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
session.serialize_handler. Failed to decode session object.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Unknown 
session.serialize_handler. Failed to decode session object);
return;
}
if (PS(serializer)-decode(val, vallen TSRMLS_CC) == FAILURE) {
php_session_destroy(TSRMLS_C);
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to decode 
session object. Session has been destroyed.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, Failed to decode 
session object. Session has been destroyed);
}
 }
 
@@ -895,7 +895,7 @@
}
 
if (!PS(mod)) {
-   php_error_docref(NULL TSRMLS_CC, E_ERROR, No storage module 
chosen - failed to initialize session.);
+   php_error_docref(NULL TSRMLS_CC, E_ERROR, No storage module 
chosen - failed to initialize session);
return;
}
 
@@ -957,7 +957,7 @@
case HASH_KEY_IS_LONG:
php_error_docref(NULL TSRMLS_CC, E_NOTICE, The session 
bug compatibility code will not 
try to locate the global variable $%lu 
due to its 
-   numeric nature., num_key);
+   numeric nature, num_key);
break;
}

@@ -987,7 +987,7 @@
}
 
if (do_warn  PS(bug_compat_warn)) {
-   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Your script possibly relies on a session side-effect which existed until PHP 
4.2.3. Please be advised that the session extension does not consider global 
variables as a source of data, unless register_globals is enabled. You can 
disable this functionality and this warning by setting session.bug_compat_42 or 
session.bug_compat_warn to off, respectively.);
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Your script possibly relies on a session side-effect which existed until PHP 
4.2.3. Please be advised that the session extension does not consider global 
variables as a source of data, unless register_globals is enabled. You can 
disable this functionality and this warning by setting session.bug_compat_42 or 
session.bug_compat_warn to off, respectively);
}
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-06-27 Thread Felipe Pena
felipe  Fri Jun 27 16:16:24 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  - Added arginfo
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.9r2=1.417.2.8.2.40.2.10diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.9 
php-src/ext/session/session.c:1.417.2.8.2.40.2.10
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.9Tue Jun 24 06:47:45 2008
+++ php-src/ext/session/session.c   Fri Jun 27 16:16:23 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.9 2008/06/24 06:47:45 dmitry Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.10 2008/06/27 16:16:23 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -55,29 +55,110 @@
 #include mod_mm.h
 #endif
 
+/* {{{ arginfo */
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_name, 0, 0, 0)
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_module_name, 0, 0, 0)
+   ZEND_ARG_INFO(0, module)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_save_path, 0, 0, 0)
+   ZEND_ARG_INFO(0, path)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_id, 0, 0, 0)
+   ZEND_ARG_INFO(0, id)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_regenerate_id, 0, 0, 0)
+   ZEND_ARG_INFO(0, delete_old_session)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_decode, 0, 0, 1)
+   ZEND_ARG_INFO(0, data)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_register, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+   ZEND_ARG_INFO(0, ...)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_unregister, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_is_registered, 0, 0, 1)
+   ZEND_ARG_INFO(0, name)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO(arginfo_session_void, 0)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_set_save_handler, 0, 0, 6)
+   ZEND_ARG_INFO(0, open)
+   ZEND_ARG_INFO(0, close)
+   ZEND_ARG_INFO(0, read)
+   ZEND_ARG_INFO(0, write)
+   ZEND_ARG_INFO(0, destroy)
+   ZEND_ARG_INFO(0, gc)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_cache_limiter, 0, 0, 0)
+   ZEND_ARG_INFO(0, cache_limiter)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_cache_expire, 0, 0, 0)
+   ZEND_ARG_INFO(0, new_cache_expire)
+ZEND_END_ARG_INFO()
+
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_session_set_cookie_params, 0, 0, 1)
+   ZEND_ARG_INFO(0, lifetime)
+   ZEND_ARG_INFO(0, path)
+   ZEND_ARG_INFO(0, domain)
+   ZEND_ARG_INFO(0, secure)
+   ZEND_ARG_INFO(0, httponly)
+ZEND_END_ARG_INFO()
+/* }}} */
+
 /* {{{ session_functions[]
  */
 const zend_function_entry session_functions[] = {
-   PHP_FE(session_name,  NULL)
-   PHP_FE(session_module_name,   NULL)
-   PHP_FE(session_save_path, NULL)
-   PHP_FE(session_id,NULL)
-   PHP_FE(session_regenerate_id, NULL)
-   PHP_FE(session_decode,NULL)
-   PHP_FE(session_register,  NULL)
-   PHP_FE(session_unregister,NULL)
-   PHP_FE(session_is_registered, NULL)
-   PHP_FE(session_encode,NULL)
-   PHP_FE(session_start, NULL)
-   PHP_FE(session_destroy,   NULL)
-   PHP_FE(session_unset, NULL)
-   PHP_FE(session_set_save_handler,  NULL)
-   PHP_FE(session_cache_limiter, NULL)
-   PHP_FE(session_cache_expire,  NULL)
-   PHP_FE(session_set_cookie_params, NULL)
-   PHP_FE(session_get_cookie_params, NULL)
-   PHP_FE(session_write_close,   NULL)
-   PHP_FALIAS(session_commit, session_write_close, NULL)
+   PHP_FE(session_name,  arginfo_session_name)
+   PHP_FE(session_module_name,   arginfo_session_module_name)
+   PHP_FE(session_save_path, arginfo_session_save_path)
+   PHP_FE(session_id,arginfo_session_id)
+   PHP_FE(session_regenerate_id, arginfo_session_regenerate_id)
+   PHP_FE(session_decode,arginfo_session_decode)
+   PHP_FE(session_register,  arginfo_session_register)
+   PHP_FE(session_unregister,arginfo_session_unregister)
+   PHP_FE(session_is_registered, arginfo_session_is_registered)
+   PHP_FE(session_encode,arginfo_session_void)
+   PHP_FE(session_start, arginfo_session_void)
+   PHP_FE(session_destroy,   arginfo_session_void)
+   PHP_FE(session_unset, arginfo_session_void)
+   PHP_FE(session_set_save_handler,  

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-06-24 Thread Dmitry Stogov
dmitry  Tue Jun 24 06:47:45 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  Fixed memory leaks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.8r2=1.417.2.8.2.40.2.9diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.8 
php-src/ext/session/session.c:1.417.2.8.2.40.2.9
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.8Sat Jun 21 15:27:34 2008
+++ php-src/ext/session/session.c   Tue Jun 24 06:47:45 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.8 2008/06/21 15:27:34 felipe Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.9 2008/06/24 06:47:45 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1497,11 +1497,13 @@
}

if (PS(session_status) != php_session_none) {
+   efree(args);
RETURN_FALSE;
}

for (i = 0; i  6; i++) {
if (!zend_is_callable(*args[i], 0, name)) {
+   efree(args);
php_error_docref(NULL TSRMLS_CC, E_WARNING, Argument 
%d is not a valid callback, i+1);
efree(name);
RETURN_FALSE;
@@ -1519,6 +1521,7 @@
PS(mod_user_names).names[i] = *args[i];
}

+   efree(args);
RETURN_TRUE;
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c /ext/session/tests session_cache_limiter_error.phpt session_id_error.phpt session_is_registered_basic.phpt session_is_registered_variation1.phpt

2008-06-21 Thread Felipe Pena
felipe  Sat Jun 21 15:27:34 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
/php-src/ext/session/tests  session_cache_limiter_error.phpt 
session_id_error.phpt 
session_is_registered_basic.phpt 
session_is_registered_variation1.phpt 
session_module_name_error.phpt 
session_name_error.phpt 
session_register_variation2.phpt 
session_save_path_error.phpt 
session_set_cookie_params_error.phpt 
session_unregister_basic.phpt 
  Log:
  - New parameter parsing API
  
  http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.7r2=1.417.2.8.2.40.2.8diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.7 
php-src/ext/session/session.c:1.417.2.8.2.40.2.8
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.7Tue Apr 15 00:59:04 2008
+++ php-src/ext/session/session.c   Sat Jun 21 15:27:34 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.7 2008/04/15 00:59:04 scottmac Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.8 2008/06/21 15:27:34 felipe Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1375,33 +1375,33 @@
Set session cookie parameters */
 PHP_FUNCTION(session_set_cookie_params)
 {
-   zval **lifetime, **path, **domain, **secure,  **httponly;
-
-   if (!PS(use_cookies))
+   zval **lifetime;
+   char *path = NULL, *domain = NULL;
+   int path_len, domain_len, argc = ZEND_NUM_ARGS();
+   zend_bool secure, httponly;
+   
+   if (!PS(use_cookies)) {
return;
+   }
 
-   if (ZEND_NUM_ARGS()  1 || ZEND_NUM_ARGS()  5 ||
-   zend_get_parameters_ex(ZEND_NUM_ARGS(), lifetime, path, 
domain, secure, httponly) == FAILURE)
-   WRONG_PARAM_COUNT;
+   if (zend_parse_parameters(argc TSRMLS_CC, Z|ssbb, lifetime, path, 
path_len, domain, domain_len, secure, httponly) == FAILURE) {
+   return;
+   }
 
convert_to_string_ex(lifetime);
+   
zend_alter_ini_entry(session.cookie_lifetime, 
sizeof(session.cookie_lifetime), Z_STRVAL_PP(lifetime), 
Z_STRLEN_PP(lifetime), PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
 
-   if (ZEND_NUM_ARGS()  1) {
-   convert_to_string_ex(path);
-   zend_alter_ini_entry(session.cookie_path, 
sizeof(session.cookie_path), Z_STRVAL_PP(path), Z_STRLEN_PP(path), 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
-
-   if (ZEND_NUM_ARGS()  2) {
-   convert_to_string_ex(domain);
-   zend_alter_ini_entry(session.cookie_domain, 
sizeof(session.cookie_domain), Z_STRVAL_PP(domain), Z_STRLEN_PP(domain), 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
-   if (ZEND_NUM_ARGS()  3) {
-   convert_to_long_ex(secure);
-   zend_alter_ini_entry(session.cookie_secure, 
sizeof(session.cookie_secure), Z_BVAL_PP(secure)?1:0, 1, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
-   }
-   if (ZEND_NUM_ARGS()  4) {
-   convert_to_long_ex(httponly);
-   
zend_alter_ini_entry(session.cookie_httponly, 
sizeof(session.cookie_httponly), Z_BVAL_PP(httponly)?1:0, 1, 
PHP_INI_USER, PHP_INI_STAGE_RUNTIME);
+   if (argc  1) {
+   zend_alter_ini_entry(session.cookie_path, 
sizeof(session.cookie_path), path, path_len, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
+   if (argc  2) {
+   zend_alter_ini_entry(session.cookie_domain, 
sizeof(session.cookie_domain), domain, domain_len, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
+   if (argc  3) {
+   zend_alter_ini_entry(session.cookie_secure, 
sizeof(session.cookie_secure), secure?1:0, 1, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
+   if (argc  4) {
+   
zend_alter_ini_entry(session.cookie_httponly, 
sizeof(session.cookie_httponly), httponly?1:0, 1, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
}
+   }
}
}
 }
@@ -1429,18 +1429,17 @@
Return the current session name. If newname is given, the session name is 
replaced with newname */
 PHP_FUNCTION(session_name)
 {
-   zval **p_name;
-   int ac = ZEND_NUM_ARGS();
-   char *old;
+   char *old, *p_name = NULL;
+   int p_name_len, argc = ZEND_NUM_ARGS();
 
-   if (ac  0 || ac  1 || zend_get_parameters_ex(ac, p_name) == FAILURE)
-   WRONG_PARAM_COUNT;
+ 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-04-14 Thread Scott MacVicar
scottmacTue Apr 15 00:59:04 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  Fixed bug #44720 (Prevent infinite recursion within session_register)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.6r2=1.417.2.8.2.40.2.7diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.6 
php-src/ext/session/session.c:1.417.2.8.2.40.2.7
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.6Tue Mar 11 09:36:41 2008
+++ php-src/ext/session/session.c   Tue Apr 15 00:59:04 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.6 2008/03/11 09:36:41 dmitry Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.7 2008/04/15 00:59:04 scottmac Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1655,12 +1655,19 @@
zval **value;

if (Z_TYPE_PP(entry) == IS_ARRAY) {
+   if (Z_ARRVAL_PP(entry)-nApplyCount  1) {
+   return;
+   }
+
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(entry));
+   Z_ARRVAL_PP(entry)-nApplyCount++;
 
while (zend_hash_get_current_data(Z_ARRVAL_PP(entry), 
(void**)value) == SUCCESS) {
php_register_var(value TSRMLS_CC);
zend_hash_move_forward(Z_ARRVAL_PP(entry));
}
+
+   Z_ARRVAL_PP(entry)-nApplyCount--;
} else {
convert_to_string_ex(entry);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Dmitry Stogov
dmitry  Tue Mar 11 09:36:41 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/sessionsession.c 
  Log:
  Fixed memory corruption because of double free()
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.40.2.5r2=1.417.2.8.2.40.2.6diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.40.2.5 
php-src/ext/session/session.c:1.417.2.8.2.40.2.6
--- php-src/ext/session/session.c:1.417.2.8.2.40.2.5Mon Mar 10 22:12:35 2008
+++ php-src/ext/session/session.c   Tue Mar 11 09:36:41 2008
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.40.2.5 2008/03/10 22:12:35 felipe Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.40.2.6 2008/03/11 09:36:41 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1943,6 +1943,7 @@
for (i = 0; i  6; i++) {
if (PS(mod_user_names).names[i] != NULL) {
zval_ptr_dtor(PS(mod_user_names).names[i]);
+   PS(mod_user_names).names[i] = NULL;
}
}
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Stanislav Malyshev

Dmitry,

Do we need this in 5.2?


I think we do, looks low-risk to me.
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Gwynne Raskind

On Mar 11, 2008, at 3:50 PM, Stanislav Malyshev wrote:

Dmitry,
Do we need this in 5.2?


I think we do, looks low-risk to me.



Nope; this commit fixed a bug with my patch to 5.3/HEAD. It wasn't  
backported to 5.2 in the first place.


-- Gwynne, Daughter of the Code
This whole world is an asylum for the incurable.




--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) /ext/session session.c

2008-03-11 Thread Stanislav Malyshev

Dmitry,
Do we need this in 5.2?


I think we do, looks low-risk to me.



Nope; this commit fixed a bug with my patch to 5.3/HEAD. It wasn't 
backported to 5.2 in the first place.


Ah, my bad, I thought it was in 5.2 too :)
--
Stanislav Malyshev, Zend Software Architect
[EMAIL PROTECTED]   http://www.zend.com/
(408)253-8829   MSN: [EMAIL PROTECTED]

--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php