[PHP-CVS-DAILY] cvs: php-src / ChangeLog

2006-04-07 Thread changelog
changelog   Sat Apr  8 05:31:48 2006 UTC

  Modified files:  
/php-srcChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/php-src/ChangeLog?r1=1.2308r2=1.2309diff_format=u
Index: php-src/ChangeLog
diff -u php-src/ChangeLog:1.2308 php-src/ChangeLog:1.2309
--- php-src/ChangeLog:1.2308Fri Apr  7 05:31:44 2006
+++ php-src/ChangeLog   Sat Apr  8 05:31:48 2006
@@ -1,3 +1,72 @@
+2006-04-07  Andrei Zmievski  [EMAIL PROTECTED]
+
+* ext/pcre/TODO
+  ext/pcre/php_pcre.c:
+  Disallowed numeric named captures.
+
+2006-04-07  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  NEWS
+  configure.in
+  main/php_version.h:
+  RC3
+
+2006-04-07  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/sockets/sockets.c:
+  - MFB: revert leak fix, something else went wrong
+
+* (PHP_5_1)
+  ext/sockets/sockets.c:
+  - revert last commit, something else went wrong
+
+2006-04-07  Dmitry Stogov  [EMAIL PROTECTED]
+
+* main/php_variables.c
+  main/php_variables.c:
+  Optimization
+
+* sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c:
+  CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
+  so we don't need construct the same arrays twich and may just copy it
+
+2006-04-07  Pierre-Alain Joye  [EMAIL PROTECTED]
+
+* ext/sockets/sockets.c:
+  - MFB: fix leak when an error occured in socket_read, free tmpbuf
+
+* (PHP_5_1)
+  ext/sockets/sockets.c:
+  - fix leak when an error occured in socket_read, free tmpbuf
+
+2006-04-07  Dmitry Stogov  [EMAIL PROTECTED]
+
+* sapi/cgi/cgi_main.c
+  sapi/cgi/cgi_main.c:
+  Removed unnecessary copying
+
+* main/main.c
+  main/main.c:
+  We don't need setup the same time-out two times.
+
+* (PHP_5_1)
+  ZendEngine2/zend_hash.c:
+  MFH:
+  - Allowed storing NULL pointers in HashTable
+  - Optimized zend_hash_reverse_apply()
+
+* ZendEngine2/zend_hash.c:
+  - Fixed storing NULL pointers in HashTable
+  - Optimized zend_hash_reverse_apply()
+
+2006-04-07  Ilia Alshanetsky  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  ext/posix/CREDITS:
+  Adjusted credits file so that it appears properly on phpinfo()
+
 2006-04-06  Andrei Zmievski  [EMAIL PROTECTED]
 
 * ext/pcre/TODO:


[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog

2006-04-07 Thread changelog
changelog   Sat Apr  8 05:31:55 2006 UTC

  Modified files:  
/ZendEngine2ChangeLog 
  Log:
  ChangeLog update
  
http://cvs.php.net/viewcvs.cgi/ZendEngine2/ChangeLog?r1=1.894r2=1.895diff_format=u
Index: ZendEngine2/ChangeLog
diff -u ZendEngine2/ChangeLog:1.894 ZendEngine2/ChangeLog:1.895
--- ZendEngine2/ChangeLog:1.894 Fri Apr  7 05:31:53 2006
+++ ZendEngine2/ChangeLog   Sat Apr  8 05:31:55 2006
@@ -1,3 +1,15 @@
+2006-04-07  Dmitry Stogov  [EMAIL PROTECTED]
+
+* (PHP_5_1)
+  zend_hash.c:
+  MFH:
+  - Allowed storing NULL pointers in HashTable
+  - Optimized zend_hash_reverse_apply()
+
+* zend_hash.c:
+  - Fixed storing NULL pointers in HashTable
+  - Optimized zend_hash_reverse_apply()
+
 2006-04-06  Andrei Zmievski  [EMAIL PROTECTED]
 
 * zend_arg_defs.c
@@ -13073,7 +13085,7 @@
 2003-06-10  Jani Taskinen  [EMAIL PROTECTED]
 
 * zend_multiply.h:
-  - Missing $Id: ChangeLog,v 1.894 2006/04/07 05:31:53 changelog Exp $ tag
+  - Missing $Id: ChangeLog,v 1.895 2006/04/08 05:31:55 changelog Exp $ tag
 
 2003-06-10  James Cox  [EMAIL PROTECTED]
 
@@ -14797,7 +14809,7 @@
   zend_types.h
   zend_variables.c
   zend_variables.h:
-  - Added some missing CVS $Id: ChangeLog,v 1.894 2006/04/07 05:31:53 
changelog Exp $ tags, headers and footers.
+  - Added some missing CVS $Id: ChangeLog,v 1.895 2006/04/08 05:31:55 
changelog Exp $ tags, headers and footers.
 
 2003-01-30  Ilia Alshanetsky  [EMAIL PROTECTED]
 


[PHP-CVS] cvs: php-src /main main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 11:43:43 2006 UTC

  Modified files:  
/php-src/main   main.c 
  Log:
  We don't need setup the same time-out two times.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.684r2=1.685diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.684 php-src/main/main.c:1.685
--- php-src/main/main.c:1.684   Wed Mar 29 01:20:43 2006
+++ php-src/main/main.c Fri Apr  7 11:43:43 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.684 2006/03/29 01:20:43 pollita Exp $ */
+/* $Id: main.c,v 1.685 2006/04/07 11:43:43 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1861,10 +1861,12 @@
} else {
append_file_p = NULL;
}
+   if (PG(max_input_time) == -1) {
 #ifdef PHP_WIN32
-   zend_unset_timeout(TSRMLS_C);
+   zend_unset_timeout(TSRMLS_C);
 #endif
-   zend_set_timeout(INI_INT(max_execution_time));
+   zend_set_timeout(EG(timeout_seconds));
+   }
retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);
 
} zend_end_try();

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



[PHP-CVS] cvs: php-src(PHP_5_1) /main main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 11:44:03 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/main   main.c 
  Log:
  We don't need setup the same time-out two times.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.640.2.21r2=1.640.2.22diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.21 php-src/main/main.c:1.640.2.22
--- php-src/main/main.c:1.640.2.21  Tue Mar 21 08:49:42 2006
+++ php-src/main/main.c Fri Apr  7 11:44:03 2006
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: main.c,v 1.640.2.21 2006/03/21 08:49:42 dmitry Exp $ */
+/* $Id: main.c,v 1.640.2.22 2006/04/07 11:44:03 dmitry Exp $ */
 
 /* {{{ includes
  */
@@ -1719,10 +1719,12 @@
} else {
append_file_p = NULL;
}
+   if (PG(max_input_time) == -1) {
 #ifdef PHP_WIN32
-   zend_unset_timeout(TSRMLS_C);
+   zend_unset_timeout(TSRMLS_C);
 #endif
-   zend_set_timeout(INI_INT(max_execution_time));
+   zend_set_timeout(EG(timeout_seconds));
+   }
retval = (zend_execute_scripts(ZEND_REQUIRE TSRMLS_CC, NULL, 3, 
prepend_file_p, primary_file, append_file_p) == SUCCESS);

} zend_end_try();

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



[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 12:39:28 2006 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Removed unnecessary copying
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.282r2=1.283diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.282 php-src/sapi/cgi/cgi_main.c:1.283
--- php-src/sapi/cgi/cgi_main.c:1.282   Thu Mar 23 10:20:14 2006
+++ php-src/sapi/cgi/cgi_main.c Fri Apr  7 12:39:28 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.282 2006/03/23 10:20:14 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.283 2006/04/07 12:39:28 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -412,16 +412,16 @@
 {
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *) SG(server_context);
-   char **env, *p, *t;
+   char **env, *p;
 
for (env = request-envp; env != NULL  *env != NULL; env++) {
p = strchr(*env, '=');
if (!p) {   /* malformed 
entry? */
continue;
}
-   t = estrndup(*env, p - *env);
-   php_register_variable(t, p + 1, array_ptr TSRMLS_CC);
-   efree(t);
+   *p = 0;
+   php_register_variable(*env, p + 1, array_ptr TSRMLS_CC);
+   *p = '=';
}
}
/* call php's original import as a catch-all */

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



[PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cgi cgi_main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 12:39:43 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  Removed unnecessary copying
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.11r2=1.267.2.12diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.11 
php-src/sapi/cgi/cgi_main.c:1.267.2.12
--- php-src/sapi/cgi/cgi_main.c:1.267.2.11  Thu Mar 23 10:19:30 2006
+++ php-src/sapi/cgi/cgi_main.c Fri Apr  7 12:39:43 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.11 2006/03/23 10:19:30 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.12 2006/04/07 12:39:43 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -433,7 +433,7 @@
 {
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *) SG(server_context);
-   char **env, *p, *t;
+   char **env, *p;
int magic_quotes_gpc = PG(magic_quotes_gpc);
 
/* turn off magic_quotes while importing environment variables 
*/
@@ -443,9 +443,9 @@
if (!p) {   /* malformed 
entry? */
continue;
}
-   t = estrndup(*env, p - *env);
-   php_register_variable(t, p + 1, array_ptr TSRMLS_CC);
-   efree(t);
+   *p = 0;
+   php_register_variable(*env, p + 1, array_ptr TSRMLS_CC);
+   *p = '=';
}
PG(magic_quotes_gpc) = magic_quotes_gpc;
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/sockets sockets.c

2006-04-07 Thread Pierre-Alain Joye
pajoye  Fri Apr  7 13:33:55 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/socketssockets.c 
  Log:
  - fix leak when an error occured in socket_read, free tmpbuf
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.7r2=1.171.2.8diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.7 
php-src/ext/sockets/sockets.c:1.171.2.8
--- php-src/ext/sockets/sockets.c:1.171.2.7 Sun Jan  1 12:50:13 2006
+++ php-src/ext/sockets/sockets.c   Fri Apr  7 13:33:55 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.7 2006/01/01 12:50:13 sniper Exp $ */
+/* $Id: sockets.c,v 1.171.2.8 2006/04/07 13:33:55 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -871,6 +871,7 @@
php_sock-error = errno;
SOCKETS_G(last_error) = errno;
} else {
+   efree(tmpbuf);
PHP_SOCKET_ERROR(php_sock, unable to read from 
socket, errno);
}
 

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



[PHP-CVS] cvs: php-src /ext/sockets sockets.c

2006-04-07 Thread Pierre-Alain Joye
pajoye  Fri Apr  7 13:34:53 2006 UTC

  Modified files:  
/php-src/ext/socketssockets.c 
  Log:
  - MFB: fix leak when an error occured in socket_read, free tmpbuf
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sockets/sockets.c?r1=1.177r2=1.178diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.177 php-src/ext/sockets/sockets.c:1.178
--- php-src/ext/sockets/sockets.c:1.177 Sun Jan  1 13:09:54 2006
+++ php-src/ext/sockets/sockets.c   Fri Apr  7 13:34:53 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.177 2006/01/01 13:09:54 sniper Exp $ */
+/* $Id: sockets.c,v 1.178 2006/04/07 13:34:53 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -869,6 +869,7 @@
php_sock-error = errno;
SOCKETS_G(last_error) = errno;
} else {
+   efree(tmpbuf);
PHP_SOCKET_ERROR(php_sock, unable to read from 
socket, errno);
}
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cgi cgi_main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 13:45:23 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/cgi   cgi_main.c 
  Log:
  CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
  so we don't need construct the same arrays twich and may just copy it
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.267.2.12r2=1.267.2.13diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.267.2.12 
php-src/sapi/cgi/cgi_main.c:1.267.2.13
--- php-src/sapi/cgi/cgi_main.c:1.267.2.12  Fri Apr  7 12:39:43 2006
+++ php-src/sapi/cgi/cgi_main.c Fri Apr  7 13:45:23 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.267.2.12 2006/04/07 12:39:43 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.267.2.13 2006/04/07 13:45:23 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -431,6 +431,17 @@
 #if PHP_FASTCGI
 void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
 {
+   if (PG(http_globals)[TRACK_VARS_ENV] 
+   array_ptr != PG(http_globals)[TRACK_VARS_ENV]) {
+   *array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
+   zval_copy_ctor(array_ptr);
+   return;
+   } else if (PG(http_globals)[TRACK_VARS_SERVER] 
+   array_ptr != PG(http_globals)[TRACK_VARS_SERVER]) {
+   *array_ptr = *PG(http_globals)[TRACK_VARS_SERVER];
+   zval_copy_ctor(array_ptr);
+   return;
+   }
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *) SG(server_context);
char **env, *p;

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



[PHP-CVS] cvs: php-src /sapi/cgi cgi_main.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 13:45:51 2006 UTC

  Modified files:  
/php-src/sapi/cgi   cgi_main.c 
  Log:
  CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
  so we don't need construct the same arrays twich and may just copy it
  
  
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/cgi_main.c?r1=1.283r2=1.284diff_format=u
Index: php-src/sapi/cgi/cgi_main.c
diff -u php-src/sapi/cgi/cgi_main.c:1.283 php-src/sapi/cgi/cgi_main.c:1.284
--- php-src/sapi/cgi/cgi_main.c:1.283   Fri Apr  7 12:39:28 2006
+++ php-src/sapi/cgi/cgi_main.c Fri Apr  7 13:45:51 2006
@@ -20,7 +20,7 @@
+--+
 */
 
-/* $Id: cgi_main.c,v 1.283 2006/04/07 12:39:28 dmitry Exp $ */
+/* $Id: cgi_main.c,v 1.284 2006/04/07 13:45:51 dmitry Exp $ */
 
 #include php.h
 #include php_globals.h
@@ -410,6 +410,17 @@
 
 void cgi_php_import_environment_variables(zval *array_ptr TSRMLS_DC)
 {
+   if (PG(http_globals)[TRACK_VARS_ENV] 
+   array_ptr != PG(http_globals)[TRACK_VARS_ENV]) {
+   *array_ptr = *PG(http_globals)[TRACK_VARS_ENV];
+   zval_copy_ctor(array_ptr);
+   return;
+   } else if (PG(http_globals)[TRACK_VARS_SERVER] 
+   array_ptr != PG(http_globals)[TRACK_VARS_SERVER]) {
+   *array_ptr = *PG(http_globals)[TRACK_VARS_SERVER];
+   zval_copy_ctor(array_ptr);
+   return;
+   }
if (!FCGX_IsCGI()) {
FCGX_Request *request = (FCGX_Request *) SG(server_context);
char **env, *p;

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



[PHP-CVS] cvs: php-src(PHP_5_1) /main php_variables.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 13:57:27 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/main   php_variables.c 
  Log:
  Optimization
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.104.2.7r2=1.104.2.8diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.104.2.7 
php-src/main/php_variables.c:1.104.2.8
--- php-src/main/php_variables.c:1.104.2.7  Mon Mar 20 10:15:02 2006
+++ php-src/main/php_variables.cFri Apr  7 13:57:27 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_variables.c,v 1.104.2.7 2006/03/20 10:15:02 dmitry Exp $ */
+/* $Id: php_variables.c,v 1.104.2.8 2006/04/07 13:57:27 dmitry Exp $ */
 
 #include stdio.h
 #include php.h
@@ -64,7 +64,7 @@
char *index, *escaped_index = NULL;
int var_len, index_len;
zval *gpc_element, **gpc_element_p;
-   zend_bool is_array;
+   zend_bool is_array = 0;
HashTable *symtable1 = NULL;
 
assert(var != NULL);
@@ -83,44 +83,43 @@
/*
 * Prepare variable name
 */
-   ip = strchr(var, '[');
-   if (ip) {
-   is_array = 1;
-   *ip = 0;
-   } else {
-   is_array = 0;
-   }
+
/* ignore leading spaces in the variable name */
while (*var  *var==' ') {
var++;
}
-   var_len = strlen(var);
+
+   /* ensure that we don't have spaces or dots in the variable name (not 
binary safe) */
+   for (p = var; *p; p++) {
+   if (*p == ' ' || *p == '.') {
+   *p='_';
+   } else if (*p == '[') {
+   is_array = 1;
+   ip = p;
+   *p = 0;
+   break;
+   }
+   }
+   var_len = p - var;
+
if (var_len==0) { /* empty variable name, or variable name with a space 
in it */
zval_dtor(val);
return;
}
 
/* GLOBALS hijack attempt, reject parameter */
-   if (symtable1 == EG(active_symbol_table)  !strcmp(GLOBALS, var)) {
+   if (symtable1 == EG(active_symbol_table) 
+   var_len == sizeof(GLOBALS)-1 
+   !memcmp(var, GLOBALS, sizeof(GLOBALS)-1)) {
zval_dtor(val);
return;
}
 
-   /* ensure that we don't have spaces or dots in the variable name (not 
binary safe) */
-   for (p=var; *p; p++) {
-   switch (*p) {
-   case ' ':
-   case '.':
-   *p='_';
-   break;
-   }
-   }
-
index = var;
index_len = var_len;
 
-   while (1) {
-   if (is_array) {
+   if (is_array) {
+   while (1) {
char *index_s;
int new_idx_len = 0;
 
@@ -181,41 +180,36 @@
} else {
is_array = 0;
}
-   } else {
+   }
+   } else {
 plain_var:
-   MAKE_STD_ZVAL(gpc_element);
-   gpc_element-value = val-value;
-   Z_TYPE_P(gpc_element) = Z_TYPE_P(val);
-   if (!index) {
-   zend_hash_next_index_insert(symtable1, 
gpc_element, sizeof(zval *), (void **) gpc_element_p);
+   MAKE_STD_ZVAL(gpc_element);
+   gpc_element-value = val-value;
+   Z_TYPE_P(gpc_element) = Z_TYPE_P(val);
+   if (!index) {
+   zend_hash_next_index_insert(symtable1, gpc_element, 
sizeof(zval *), (void **) gpc_element_p);
+   } else {
+   if (PG(magic_quotes_gpc)) { 
+   escaped_index = php_addslashes(index, 
index_len, index_len, 0 TSRMLS_CC);
+   } else {
+   escaped_index = index;
+   }
+   /* 
+* According to rfc2965, more specific paths are listed 
above the less specific ones.
+* If we encounter a duplicate cookie name, we should 
skip it, since it is not possible
+* to have the same (plain text) cookie name for the 
same path and we should not overwrite
+* more specific cookies with the less specific ones.
+*/
+   if (PG(http_globals)[TRACK_VARS_COOKIE] 
+   symtable1 == 
Z_ARRVAL_P(PG(http_globals)[TRACK_VARS_COOKIE]) 
+   zend_symtable_exists(symtable1, escaped_index, 
index_len + 1)) {
+   zval_ptr_dtor(gpc_element);
} else {
-   zval **tmp;
-
-   

[PHP-CVS] cvs: php-src /main php_variables.c

2006-04-07 Thread Dmitry Stogov
dmitry  Fri Apr  7 13:57:39 2006 UTC

  Modified files:  
/php-src/main   php_variables.c 
  Log:
  Optimization
  
  
http://cvs.php.net/viewcvs.cgi/php-src/main/php_variables.c?r1=1.123r2=1.124diff_format=u
Index: php-src/main/php_variables.c
diff -u php-src/main/php_variables.c:1.123 php-src/main/php_variables.c:1.124
--- php-src/main/php_variables.c:1.123  Mon Mar 20 10:18:50 2006
+++ php-src/main/php_variables.cFri Apr  7 13:57:39 2006
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: php_variables.c,v 1.123 2006/03/20 10:18:50 dmitry Exp $ */
+/* $Id: php_variables.c,v 1.124 2006/04/07 13:57:39 dmitry Exp $ */
 
 #include stdio.h
 #include php.h
@@ -70,10 +70,10 @@
 {
char *p = NULL;
char *ip;   /* index pointer */
-   char *index, *escaped_index = NULL;
+   char *index;
int var_len, index_len;
zval *gpc_element, **gpc_element_p;
-   zend_bool is_array;
+   zend_bool is_array = 0;
HashTable *symtable1 = NULL;
 
assert(var != NULL);
@@ -91,44 +91,43 @@
/*
 * Prepare variable name
 */
-   ip = strchr(var, '[');
-   if (ip) {
-   is_array = 1;
-   *ip = 0;
-   } else {
-   is_array = 0;
-   }
+
/* ignore leading spaces in the variable name */
while (*var  *var==' ') {
var++;
}
-   var_len = strlen(var);
+
+   /* ensure that we don't have spaces or dots in the variable name (not 
binary safe) */
+   for (p = var; *p; p++) {
+   if (*p == ' ' || *p == '.') {
+   *p='_';
+   } else if (*p == '[') {
+   is_array = 1;
+   ip = p;
+   *p = 0;
+   break;
+   }
+   }
+   var_len = p - var;
+
if (var_len==0) { /* empty variable name, or variable name with a space 
in it */
zval_dtor(val);
return;
}
 
/* GLOBALS hijack attempt, reject parameter */
-   if (symtable1 == EG(active_symbol_table)  !strcmp(GLOBALS, var)) {
+   if (symtable1 == EG(active_symbol_table) 
+   var_len == sizeof(GLOBALS)-1 
+   !memcmp(var, GLOBALS, sizeof(GLOBALS)-1)) {
zval_dtor(val);
return;
}
 
-   /* ensure that we don't have spaces or dots in the variable name (not 
binary safe) */
-   for (p=var; *p; p++) {
-   switch (*p) {
-   case ' ':
-   case '.':
-   *p='_';
-   break;
-   }
-   }
-
index = var;
index_len = var_len;
 
-   while (1) {
-   if (is_array) {
+   if (is_array) {
+   while (1) {
char *index_s;
int new_idx_len = 0;
 
@@ -161,16 +160,11 @@
array_init(gpc_element);
zend_hash_next_index_insert(symtable1, 
gpc_element, sizeof(zval *), (void **) gpc_element_p);
} else {
-   escaped_index = index;
-
-   if (zend_symtable_find(symtable1, 
escaped_index, index_len + 1, (void **) gpc_element_p) == FAILURE
+   if (zend_symtable_find(symtable1, index, 
index_len + 1, (void **) gpc_element_p) == FAILURE
|| Z_TYPE_PP(gpc_element_p) != 
IS_ARRAY) {
MAKE_STD_ZVAL(gpc_element);
array_init(gpc_element);
-   zend_symtable_update(symtable1, 
escaped_index, index_len + 1, gpc_element, sizeof(zval *), (void **) 
gpc_element_p);
-   }
-   if (index != escaped_index) {
-   efree(escaped_index);
+   zend_symtable_update(symtable1, index, 
index_len + 1, gpc_element, sizeof(zval *), (void **) gpc_element_p);
}
}
symtable1 = Z_ARRVAL_PP(gpc_element_p);
@@ -185,38 +179,28 @@
} else {
is_array = 0;
}
-   } else {
+   }
+   } else {
 plain_var:
-   MAKE_STD_ZVAL(gpc_element);
-   gpc_element-value = val-value;
-   Z_TYPE_P(gpc_element) = Z_TYPE_P(val);
-   if (!index) {
-   zend_hash_next_index_insert(symtable1, 
gpc_element, sizeof(zval *), (void **) gpc_element_p);
+   MAKE_STD_ZVAL(gpc_element);
+  

[PHP-CVS] cvs: php-src(PHP_5_1) /ext/sockets sockets.c

2006-04-07 Thread Pierre-Alain Joye
pajoye  Fri Apr  7 14:04:36 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/socketssockets.c 
  Log:
  - revert last commit, something else went wrong
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.8r2=1.171.2.9diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.171.2.8 
php-src/ext/sockets/sockets.c:1.171.2.9
--- php-src/ext/sockets/sockets.c:1.171.2.8 Fri Apr  7 13:33:55 2006
+++ php-src/ext/sockets/sockets.c   Fri Apr  7 14:04:36 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.171.2.8 2006/04/07 13:33:55 pajoye Exp $ */
+/* $Id: sockets.c,v 1.171.2.9 2006/04/07 14:04:36 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -871,7 +871,6 @@
php_sock-error = errno;
SOCKETS_G(last_error) = errno;
} else {
-   efree(tmpbuf);
PHP_SOCKET_ERROR(php_sock, unable to read from 
socket, errno);
}
 

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



[PHP-CVS] cvs: php-src /ext/sockets sockets.c

2006-04-07 Thread Pierre-Alain Joye
pajoye  Fri Apr  7 14:05:21 2006 UTC

  Modified files:  
/php-src/ext/socketssockets.c 
  Log:
  - MFB: revert leak fix, something else went wrong
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/sockets/sockets.c?r1=1.178r2=1.179diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.178 php-src/ext/sockets/sockets.c:1.179
--- php-src/ext/sockets/sockets.c:1.178 Fri Apr  7 13:34:53 2006
+++ php-src/ext/sockets/sockets.c   Fri Apr  7 14:05:21 2006
@@ -19,7 +19,7 @@
+--+
  */
 
-/* $Id: sockets.c,v 1.178 2006/04/07 13:34:53 pajoye Exp $ */
+/* $Id: sockets.c,v 1.179 2006/04/07 14:05:21 pajoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -869,7 +869,6 @@
php_sock-error = errno;
SOCKETS_G(last_error) = errno;
} else {
-   efree(tmpbuf);
PHP_SOCKET_ERROR(php_sock, unable to read from 
socket, errno);
}
 

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



[PHP-CVS] cvs: php-src(PHP_5_1) / NEWS

2006-04-07 Thread Ilia Alshanetsky
iliaa   Fri Apr  7 14:20:56 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcNEWS 
  Log:
  RC3
  
  
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.498r2=1.2027.2.499diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.498 php-src/NEWS:1.2027.2.499
--- php-src/NEWS:1.2027.2.498   Thu Apr  6 21:11:12 2006
+++ php-src/NEWSFri Apr  7 14:20:56 2006
@@ -1,6 +1,6 @@
 PHPNEWS
 |||
-30 Mar 2006, PHP 5.1.3RC2
+06 Apr 2006, PHP 5.1.3RC3
 - Fixed a bug that would not fill in the fifth argument to preg_replace() 
   properly, if the variable was not declared previously. (Andrei)
 - Fixed safe_mode check for source argument of the copy() function. (Ilia)

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



[PHP-CVS] cvs: php-src(PHP_5_1) / configure.in /main php_version.h

2006-04-07 Thread Ilia Alshanetsky
iliaa   Fri Apr  7 14:21:13 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-srcconfigure.in 
/php-src/main   php_version.h 
  Log:
  RC3
  
  
http://cvs.php.net/viewcvs.cgi/php-src/configure.in?r1=1.579.2.42r2=1.579.2.43diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.42 php-src/configure.in:1.579.2.43
--- php-src/configure.in:1.579.2.42 Thu Mar 30 19:40:15 2006
+++ php-src/configure.inFri Apr  7 14:21:13 2006
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.42 2006/03/30 19:40:15 iliaa Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.43 2006/04/07 14:21:13 iliaa Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -42,7 +42,7 @@
 MAJOR_VERSION=5
 MINOR_VERSION=1
 RELEASE_VERSION=3
-EXTRA_VERSION=RC3-dev
+EXTRA_VERSION=RC3
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION
 
 dnl Define where extension directories are located in the configure context
http://cvs.php.net/viewcvs.cgi/php-src/main/php_version.h?r1=1.112.2.29r2=1.112.2.30diff_format=u
Index: php-src/main/php_version.h
diff -u php-src/main/php_version.h:1.112.2.29 
php-src/main/php_version.h:1.112.2.30
--- php-src/main/php_version.h:1.112.2.29   Thu Mar 30 19:40:16 2006
+++ php-src/main/php_version.h  Fri Apr  7 14:21:13 2006
@@ -3,5 +3,5 @@
 #define PHP_MAJOR_VERSION 5
 #define PHP_MINOR_VERSION 1
 #define PHP_RELEASE_VERSION 3
-#define PHP_EXTRA_VERSION RC3-dev
-#define PHP_VERSION 5.1.3RC3-dev
+#define PHP_EXTRA_VERSION RC3
+#define PHP_VERSION 5.1.3RC3

-- 
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_1) /sapi/cgi cgi_main.c

2006-04-07 Thread Lukas Kahwe Smith

Dmitry Stogov wrote:

dmitry  Fri Apr  7 13:45:23 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/sapi/cgi	cgi_main.c 
  Log:

  CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
  so we don't need construct the same arrays twich and may just copy it


Are you sure that this is a safe enough assumption that it should be 
made in RC2 of 5.1.3?


regards,
Lukas

--
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_1) /sapi/cgi cgi_main.c

2006-04-07 Thread Dmitry Stogov
Hi Lukas,

I am sure.
I spoke with Ilia and he was going to roll next RC.
BTW I agree to rollback this patch.

Thanks. Dmitry.

 -Original Message-
 From: Lukas Kahwe Smith [mailto:[EMAIL PROTECTED] 
 Sent: Friday, April 07, 2006 6:22 PM
 To: Dmitry Stogov
 Cc: php-cvs@lists.php.net
 Subject: Re: [PHP-CVS] cvs: php-src(PHP_5_1) /sapi/cgi cgi_main.c
 
 
 Dmitry Stogov wrote:
  dmitry  Fri Apr  7 13:45:23 2006 UTC
  
Modified files:  (Branch: PHP_5_1)
  /php-src/sapi/cgi   cgi_main.c 
Log:
CGI anf FastCGI assume $_SERVER and $_ENV have the same values,
so we don't need construct the same arrays twich and may 
 just copy 
  it
 
 Are you sure that this is a safe enough assumption that it should be 
 made in RC2 of 5.1.3?
 
 regards,
 Lukas
 
 
 

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



[PHP-CVS] cvs: CVSROOT / avail

2006-04-07 Thread Andrei Zmievski
andrei  Fri Apr  7 18:15:48 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  Give colder php-doc karma
  
  http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1114r2=1.1115diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1114 CVSROOT/avail:1.1115
--- CVSROOT/avail:1.1114Thu Apr  6 19:21:47 2006
+++ CVSROOT/avail   Fri Apr  7 18:15:48 2006
@@ -37,7 +37,7 @@
 # The PHP Documentation Group maintains the documentation and its
 # translations.
 
-avail|takagi,gcc,cem,mfp,ansriniv,jsgoupil,mazzanet,dbs,frogger,coldocean,alan_k,fleaslob,torben,lynch,kk,ted,paul,mbritton,coar,joey,bibi,mrobinso,perugini,tzwenny,hirokawa,drews,paulsen,hartmann,leon,jonen,tschuer,tfromm,manuel,stas,danbeck,sli,jmcastagnetto,mohrt,goba,samesch,jon,soneca,ronabop,glace,latoserver,rafael,jan,jcmeloni,chrullrich,mk,sebastian,troels,mathieu,phaethon,mj,corean,pandach,cycle98,vizvil,regina,cynic,jpm,dams,karoora,pcraft,suvia,zak,zimt,jmoore,ftfuture,ag315,bbonev,afortaleza,neotron,cg,delrom,jkj,hellekin,kgergely,cnewbill,fuzzy74,bjoern,fams,smasiello,dim,lucasr,cpereira,ernani,theseer,noribsd,subjective,ufux,hadar_p,asautins,dbenson,aleczapka,tom,amiller,cortesi,rarruda,betz,philip,alindeman,thyla,cucinato,zyprexia,tpug,mitja,conni,sts,georg,nmav,subbie,leszek,spheroid,slawek,alan_dangelo,ae,nohn,kaser01,visualmind,kurtz,luk,tronic,moh,bernd,yohgaki,fujimoto,gerzson,webler,spooky,cece,daniel,boo,nhoizey,joerg,imajes,hakan,chief977,shlomi,raful!
 
,yuval,tomer,barak,ido,mork,lior,gal,adiju,cr_depend,florian,kappu,muricaru,dt,critix,ck,costra,fancao0515,tibee,eriksson,wenz,bs,anderson,tal,sander,matroz,ave,adu,mmeier,wentzel,scaro,aspinei,lmaxcar,manuzhai,darvina,peter,maxim,romakhin,n0nick,attila,sagi,kai,microbrain,rhheo,shimi,k.schroeder,djworld,emil,lboshell,netholic,dmitry83,progcom,verdana,yincheng,surfmax,nicos,chregu,msopacua,bbd,cyril,gregory,hudzilla,klean,mignoni,wiesemann,xqi,mersal,zruya,sean,staybyte,aber_sabeel,alzahrani,thomaslio,sfox,jippie,antonio,ahxiao,akcakayaa,allhibi,aner,black,class007,digo,dima,dorons,eshare,hpop1,itay,juppie,mrmatrix,saad,thomasgm,xbite,tobsn,jome,analytik,outsider,heymarcel,asmodean,bader,elmaystro,sp,truelight,gnuhacker,_batman_,sachat,dallas,dejan,zer0fill,steve3d,lm92,bradmssw,tahani,victor,erica,simonh,phpman,mrphp,notarius,joseph,mmkhajah,mohammed,proton,klootz,takashima,leoca,ahmad,abobader,fboudot,wurm,hakawy,felix,ahmedss,mahrous2020,yorgo,gal_ga,abodive,ama,andras,h!
 assen,jkhdk,okamura,popov,xman,fernandoc,avenger,hwin,tix,alrehawi_,li
uming,ramysaweres,astone,shiflett,jaenecke,bdensley,adamchan,jingfs,murphy,potatotsang,the_q,jsheets,xelis,equerci,phpcatala,tofanini,umut,kriga,ray,royhuggins,logician,almanar,alexws,gonik,haiaw,lkwang_cn,shadowwulf,telecart,pongsakorn,naveed,shivas,tularis,angela,decorj,hitcho,kevinkee,nmee,thx1140,crotalus,didou,novotnyr,sil,traduim,gui,mgf,ivanr,michal,tsirman,momo,cysoft,firefox,kouber,mipac,muslem,tomysk,vemarkov,garth,lord_lele,stone,laacz,retnug,ernestyang,hatem,house,luisdaniel,nizar,nvivo,seth,tomh,danguer,adam,nio,wassago,beeven,colacino,zvaranka,cesarguru,chubu,dark2907,portoban,reven,wizzard,sywr,koendw83,rylin,webstudio,jsjohnst,dmanusset,et,pitiphan,mbr,cdalar,alrashoudi,hafid,enough,zhouhao007,jnorbi,lorenzohgh,denisr,coder03,jcclaros,thomas,freeman,rioter,jschultz,davey,belleto,jtacon,yuw,ohill,elfyn,noam,nathan,salman,cheezy,ene,rezaiqbal,purnomo,dufiga_php,ftp_geo,udhien,prio,luckyguy354,maf,handi,meme,satiri,maddankara,rildo,hd,ali,lpj,adhitama,engkongs,p!
 
reilly,dave,marcelo,curt,fd,javi,mrmaster,fa,nlopess,vrana,apaxx,pjotrik,marduk,narcotia1234,enloma,trizo,xmadda,redshift,alifikri,coder,dodol_maniac,eflorin,adywarna,kyokpae,milans,lovchy,spermwhale,phaze,baoengb,derek,yannick,daan,xxiengb,ott,mg,kennyt,tomsommer,poz,zamolxe,bishmila,ph1,irchtml,rogamer,bortolini,sapfir,guru,ahmed,robinhood,sohli,amt,romain,hlecuanda,thessoro,nforbes,jolan,laze,bagilevi,young,shakaali,chokobo,portalufpa,teecee,blindman,holst,schst,mnv,sodhi,aidan,jellybob,lauer,shenkong,jad,robert,peterhuewe,ogre,techtonik,narigone,realtebo,krid,mclay,dasch,miwaniec,abdshomad,sammywg,aeoris,mez,jed,hsc,luckec,dmytton,choudesh,phpvcn,simp,michael,grantc,atex,katja,sthulbourn,mikl,kevinsz,roast,lsmith,tessus,gavinfo,rant|phpdoc,phpdoc-ar,phpdoc-bg,phpdoc-cs,phpdoc-da,phpdoc-de,phpdoc-el,phpdoc-es,phpdoc-fa_IR,phpdoc-fi,phpdoc-fr,phpdoc-he,phpdoc-hk,phpdoc-hu,phpdoc-id,phpdoc-it,phpdoc-ja,phpdoc-kr,phpdoc-lt,phpdoc-nl,phpdoc-pl,phpdoc-pt_BR,phpdoc-pt,phpdoc-r!
 o,phpdoc-ru,phpdoc-sk,phpdoc-sl,phpdoc-sv,phpdoc-tr,phpdoc-tw,phpdoc-z
h,phpdoc-ca

[PHP-CVS] cvs: php-src /ext/pcre TODO php_pcre.c

2006-04-07 Thread Andrei Zmievski
andrei  Fri Apr  7 21:20:10 2006 UTC

  Modified files:  
/php-src/ext/pcre   TODO php_pcre.c 
  Log:
  Disallowed numeric named captures.
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/pcre/TODO?r1=1.5r2=1.6diff_format=u
Index: php-src/ext/pcre/TODO
diff -u php-src/ext/pcre/TODO:1.5 php-src/ext/pcre/TODO:1.6
--- php-src/ext/pcre/TODO:1.5   Thu Apr  6 22:37:42 2006
+++ php-src/ext/pcre/TODO   Fri Apr  7 21:20:10 2006
@@ -32,6 +32,4 @@
   of a grep function in PHP would be that the default is PREG_GREP_REKEY_NUMS
   or PREG_GREP_REKEY_ALL
 
-- Disallow numeric named captures.
-
 
http://cvs.php.net/viewcvs.cgi/php-src/ext/pcre/php_pcre.c?r1=1.179r2=1.180diff_format=u
Index: php-src/ext/pcre/php_pcre.c
diff -u php-src/ext/pcre/php_pcre.c:1.179 php-src/ext/pcre/php_pcre.c:1.180
--- php-src/ext/pcre/php_pcre.c:1.179   Thu Apr  6 21:16:28 2006
+++ php-src/ext/pcre/php_pcre.c Fri Apr  7 21:20:10 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_pcre.c,v 1.179 2006/04/06 21:16:28 andrei Exp $ */
+/* $Id: php_pcre.c,v 1.180 2006/04/07 21:20:10 andrei Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -464,7 +464,7 @@
 
/*
 * Build a mapping from subpattern numbers to their names. We will 
always
-* allocate the table, even though they may be no named subpatterns. 
This
+* allocate the table, even though there may be no named subpatterns. 
This
 * avoids somewhat more complicated logic in the inner loops.
 */
subpat_names = (char **)safe_emalloc(num_subpats, sizeof(char *), 0);
@@ -478,22 +478,34 @@
if (rc  0) {
php_error(E_WARNING, %s: internal pcre_fullinfo() 
error %d,
  get_active_function_name(TSRMLS_C), 
rc);
+   efree(offsets);
+   efree(subpat_names);
RETURN_FALSE;
}
if (name_cnt  0) {
int rc1, rc2;
+   long dummy_l;
+   double dummy_d;
rc1 = pcre_fullinfo(re, extra, PCRE_INFO_NAMETABLE, 
name_table);
rc2 = pcre_fullinfo(re, extra, PCRE_INFO_NAMEENTRYSIZE, 
name_size);
rc = rc2 ? rc2 : rc1;
if (rc  0) {
php_error(E_WARNING, %s: internal 
pcre_fullinfo() error %d,
  
get_active_function_name(TSRMLS_C), rc);
+   efree(offsets);
+   efree(subpat_names);
RETURN_FALSE;
}
 
while (ni++  name_cnt) {
name_idx = 0xff * name_table[0] + name_table[1];
subpat_names[name_idx] = name_table + 2;
+   if (is_numeric_string(subpat_names[name_idx], 
strlen(subpat_names[name_idx]), dummy_l, dummy_d, 0)  0) {
+   php_error(E_WARNING, %s: numeric named 
subpatterns are not allowed, get_active_function_name(TSRMLS_C));
+   efree(offsets);
+   efree(subpat_names);
+   RETURN_FALSE;
+   }
name_table += name_size;
}
}

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



[PHP-CVS] cvs: php-src(PHP_5_1) /ext/spl spl_array.c

2006-04-07 Thread Antony Dovgal
tony2001Fri Apr  7 22:53:23 2006 UTC

  Modified files:  (Branch: PHP_5_1)
/php-src/ext/splspl_array.c 
  Log:
  fix memory corruptions and leaks when cloning ArrayObjects and ArrayIterators
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.71.2.16r2=1.71.2.17diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.71.2.16 
php-src/ext/spl/spl_array.c:1.71.2.17
--- php-src/ext/spl/spl_array.c:1.71.2.16   Tue Apr  4 19:53:21 2006
+++ php-src/ext/spl/spl_array.c Fri Apr  7 22:53:23 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.71.2.16 2006/04/04 19:53:21 helly Exp $ */
+/* $Id: spl_array.c,v 1.71.2.17 2006/04/07 22:53:23 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -144,10 +144,12 @@
if (clone_orig) {
intern-array = other-array;
if (Z_OBJ_HT_P(orig) == spl_handler_ArrayObject) {
-   ZVAL_ADDREF(intern-array);
-   SEPARATE_ZVAL(intern-array);
+   MAKE_STD_ZVAL(intern-array);
+   array_init(intern-array);
+   zend_hash_copy(HASH_OF(intern-array), 
HASH_OF(other-array), (copy_ctor_func_t) zval_add_ref, tmp, sizeof(zval*));
+   }
+   if (Z_OBJ_HT_P(orig) == spl_handler_ArrayIterator) {
ZVAL_ADDREF(other-array);
-   ZVAL_ADDREF(intern-array);
}
} else {
intern-array = orig;

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



[PHP-CVS] cvs: php-src /ext/spl spl_array.c

2006-04-07 Thread Antony Dovgal
tony2001Fri Apr  7 22:53:34 2006 UTC

  Modified files:  
/php-src/ext/splspl_array.c 
  Log:
  MF51: fix memory corruptions and leaks when cloning ArrayObjects and 
ArrayIterators
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/spl/spl_array.c?r1=1.109r2=1.110diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.109 php-src/ext/spl/spl_array.c:1.110
--- php-src/ext/spl/spl_array.c:1.109   Mon Apr  3 19:58:03 2006
+++ php-src/ext/spl/spl_array.c Fri Apr  7 22:53:34 2006
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.109 2006/04/03 19:58:03 helly Exp $ */
+/* $Id: spl_array.c,v 1.110 2006/04/07 22:53:34 tony2001 Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include config.h
@@ -149,10 +149,12 @@
if (clone_orig) {
intern-array = other-array;
if (Z_OBJ_HT_P(orig) == spl_handler_ArrayObject) {
-   ZVAL_ADDREF(intern-array);
-   SEPARATE_ZVAL(intern-array);
+   MAKE_STD_ZVAL(intern-array);
+   array_init(intern-array);
+   zend_hash_copy(HASH_OF(intern-array), 
HASH_OF(other-array), (copy_ctor_func_t) zval_add_ref, tmp, sizeof(zval*));
+   }
+   if (Z_OBJ_HT_P(orig) == spl_handler_ArrayIterator) {
ZVAL_ADDREF(other-array);
-   ZVAL_ADDREF(intern-array);
}
} else {
intern-array = orig;

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



[PHP-CVS] cvs: CVSROOT / avail

2006-04-07 Thread Pierre-Alain Joye
pajoye  Sat Apr  8 01:32:28 2006 UTC

  Modified files:  
/CVSROOTavail 
  Log:
  - lyaish karma
  
  
http://cvs.php.net/viewcvs.cgi/CVSROOT/avail?r1=1.1115r2=1.1116diff_format=u
Index: CVSROOT/avail
diff -u CVSROOT/avail:1.1115 CVSROOT/avail:1.1116
--- CVSROOT/avail:1.1115Fri Apr  7 18:15:48 2006
+++ CVSROOT/avail   Sat Apr  8 01:32:28 2006
@@ -329,7 +329,7 @@
 avail|migurski|pear/Services_JSON
 avail|makoto|pear/Services_Hatena
 avail|ehlersd|pear/Net_Geo
-
+avail|lyaish|pear/HTML_AJAX
 # Curl modules
 
avail|bagder,sterling,crisb,linus_nielsen|curl,curl-cpp,curl-java,curl-perl,curl-php,curl-www
 

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