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

2007-01-09 Thread Dmitry Stogov
dmitry  Wed Jan 10 07:04:49 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c 
  Log:
  Fixed SIGSEGV
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.25&r2=1.417.2.8.2.26&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.25 
php-src/ext/session/session.c:1.417.2.8.2.26
--- php-src/ext/session/session.c:1.417.2.8.2.25Tue Jan  9 15:31:12 2007
+++ php-src/ext/session/session.c   Wed Jan 10 07:04:49 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.25 2007/01/09 15:31:12 iliaa Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.26 2007/01/10 07:04:49 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -328,11 +328,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) {

-- 
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_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Pierre

On 1/9/07, Nuno Lopes <[EMAIL PROTECTED]> wrote:

> On Mon, 8 Jan 2007, Nuno Lopes wrote:
>
>> nlopess Mon Jan  8 22:52:23 2007 UTC
>>
>>   Modified files:  (Branch: PHP_5_2)
>> /php-src/ext/gd gd.c php_gd.h
>>   Log:
>>   avoid calling MSHUTDOWN when built without libt1
>
> Is it really needed to clog the source code with those ifdefs? It's not
> like this is a performance issue here...

I don't think this is "clogging" the code. I also think that any "free"
speedup is welcome (even minor). Anyway this part of the code is rarely
changed, so it shouldn't be any nightmare to maintain. (the ifdef was
already there. I just moved it around)


As I said, I have no real problem with such changes. I just feel like
they should not be done in a RC phase. Cleanup or "speedup" are
otherwise welcome :)

--Pierre

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS configure.in /main safe_mode.c

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 23:27:22 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcconfigure.in NEWS 
/php-src/main   safe_mode.c 
  Log:
  
  Fixed bug #40079 (php_get_current_user() not thread safe).
  
  # Original patch from wharmby at uk dot ibm dot com
  
  
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.35&r2=1.579.2.52.2.36&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.35 
php-src/configure.in:1.579.2.52.2.36
--- php-src/configure.in:1.579.2.52.2.35Thu Jan  4 23:55:56 2007
+++ php-src/configure.inTue Jan  9 23:27:21 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.35 2007/01/04 23:55:56 iliaa Exp $ -*- 
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.36 2007/01/09 23:27:21 iliaa Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -483,6 +483,7 @@
 gmtime_r \
 getpwnam_r \
 getgrnam_r \
+getpwuid_r \
 grantpt \
 inet_ntoa \
 inet_ntop \
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.484&r2=1.2027.2.547.2.485&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.484 php-src/NEWS:1.2027.2.547.2.485
--- php-src/NEWS:1.2027.2.547.2.484 Tue Jan  9 23:13:05 2007
+++ php-src/NEWSTue Jan  9 23:27:22 2007
@@ -4,6 +4,8 @@
 - Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
 - Improved proc_open(). Now on Windows it can run external commands not through
   CMD.EXE. (Dmitry)
+- Fixed bug #40079 (php_get_current_user() not thread safe). (Ilia, wharmby
+  at uk dot ibm dot com)
 - Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in
   range of signed integer). (Dmitry)
 - Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
http://cvs.php.net/viewvc.cgi/php-src/main/safe_mode.c?r1=1.62.2.1.2.5&r2=1.62.2.1.2.6&diff_format=u
Index: php-src/main/safe_mode.c
diff -u php-src/main/safe_mode.c:1.62.2.1.2.5 
php-src/main/safe_mode.c:1.62.2.1.2.6
--- php-src/main/safe_mode.c:1.62.2.1.2.5   Mon Jan  1 09:36:11 2007
+++ php-src/main/safe_mode.cTue Jan  9 23:27:22 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: safe_mode.c,v 1.62.2.1.2.5 2007/01/01 09:36:11 sebastian Exp $ */
+/* $Id: safe_mode.c,v 1.62.2.1.2.6 2007/01/09 23:27:22 iliaa Exp $ */
 
 #include "php.h"
 
@@ -228,12 +228,27 @@
return SG(request_info).current_user;   
 #else
struct passwd *pwd;
+#ifdef HAVE_GETPWUID_R
+   struct passwd _pw;
+   struct passwd *retpwptr = NULL;
+   int pwbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
+   char *pwbuf = emalloc(pwbuflen);
 
+   if (getpwuid_r(pstat->st_uid, &_pw, pwbuf, pwbuflen, &retpwptr) 
!= 0) {
+   efree(pwbuf);
+   return "";
+   }
+   pwd = &_pw;
+#else
if ((pwd=getpwuid(pstat->st_uid))==NULL) {
return "";
}
+#endif
SG(request_info).current_user_length = strlen(pwd->pw_name);
SG(request_info).current_user = estrndup(pwd->pw_name, 
SG(request_info).current_user_length);
+#ifdef HAVE_GETPWUID_R
+   efree(pwbuf);
+#endif
return SG(request_info).current_user;   
 #endif
}   

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



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/curl interface.c

2007-01-09 Thread Sara Golemon
pollita Tue Jan  9 23:13:05 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/curl   interface.c 
/php-srcNEWS 
  Log:
  MFH: Add CURLOPT_TCP_NODELAY constant
  
http://cvs.php.net/viewvc.cgi/php-src/ext/curl/interface.c?r1=1.62.2.14.2.19&r2=1.62.2.14.2.20&diff_format=u
Index: php-src/ext/curl/interface.c
diff -u php-src/ext/curl/interface.c:1.62.2.14.2.19 
php-src/ext/curl/interface.c:1.62.2.14.2.20
--- php-src/ext/curl/interface.c:1.62.2.14.2.19 Mon Jan  1 09:35:48 2007
+++ php-src/ext/curl/interface.cTue Jan  9 23:13:05 2007
@@ -16,7 +16,7 @@
+--+
 */
 
-/* $Id: interface.c,v 1.62.2.14.2.19 2007/01/01 09:35:48 sebastian Exp $ */
+/* $Id: interface.c,v 1.62.2.14.2.20 2007/01/09 23:13:05 pollita Exp $ */
 
 #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS
 
@@ -452,6 +452,7 @@
REGISTER_CURL_CONSTANT(CURLOPT_PROXYPORT);
REGISTER_CURL_CONSTANT(CURLOPT_UNRESTRICTED_AUTH);
REGISTER_CURL_CONSTANT(CURLOPT_FTP_USE_EPRT);
+   REGISTER_CURL_CONSTANT(CURLOPT_TCP_NODELAY);
REGISTER_CURL_CONSTANT(CURLOPT_HTTP200ALIASES);
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFMODSINCE);
REGISTER_CURL_CONSTANT(CURL_TIMECOND_IFUNMODSINCE);
@@ -1263,6 +1264,7 @@
case CURLOPT_PORT:
case CURLOPT_AUTOREFERER:
case CURLOPT_COOKIESESSION:
+   case CURLOPT_TCP_NODELAY:
convert_to_long_ex(zvalue);
error = curl_easy_setopt(ch->cp, option, 
Z_LVAL_PP(zvalue));
break;
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.483&r2=1.2027.2.547.2.484&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.483 php-src/NEWS:1.2027.2.547.2.484
--- php-src/NEWS:1.2027.2.547.2.483 Tue Jan  9 18:50:45 2007
+++ php-src/NEWSTue Jan  9 23:13:05 2007
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? Jan 2007, PHP 5.2.1RC3
+- Added CURLOPT_TCP_NODELAY constant to Curl extension. (Sara)
 - Improved proc_open(). Now on Windows it can run external commands not through
   CMD.EXE. (Dmitry)
 - Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in

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



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

2007-01-09 Thread Marcus Boerger
helly   Tue Jan  9 18:50:45 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - Ups wrong place
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.482&r2=1.2027.2.547.2.483&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.482 php-src/NEWS:1.2027.2.547.2.483
--- php-src/NEWS:1.2027.2.547.2.482 Tue Jan  9 18:35:32 2007
+++ php-src/NEWSTue Jan  9 18:50:45 2007
@@ -5,6 +5,7 @@
   CMD.EXE. (Dmitry)
 - Fixed bug #40076 (zend_alloc.c: Value of enumeration constant must be in
   range of signed integer). (Dmitry)
+- Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
 - Fixed bug #40036 (empty() does not work correctly with ArrayObject when using
   ARRAY_AS_PROPS). (Ilia)
 - Fixed bug #40002 (Try/Catch performs poorly). (Dmitry)
@@ -37,7 +38,6 @@
   __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
 - Fixed the validate email filter so that the letter "v" can also be used in
   the user part of the email address. (Derick)
-- Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
 - Fixed bug #40012 (php_date.c doesnt compile on Netware). (gk at gknw dot de,
   Derick)
 - Fixed bug #40009 (http_build_query(array()) returns NULL). (Ilia)

-- 
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_2) /ext/session session.c

2007-01-09 Thread Ilia Alshanetsky

Feel free to add one ;-)


On 9-Jan-07, at 1:13 PM, Nuno Lopes wrote:


I think this one needs a test..


- Original Message - From: "Ilia Alshanetsky" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, January 09, 2007 3:31 PM
Subject: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/session session.c



iliaa Tue Jan  9 15:31:12 2007 UTC

 Modified files:  (Branch: PHP_5_2)
   /php-src/ext/session session.c
 Log:

 Prevent SESSION/GLOBALS overload via session decoding


http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c? 
r1=1.417.2.8.2.24&r2=1.417.2.8.2.25&diff_format=u

Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.24 php-src/ext/ 
session/session.c:1.417.2.8.2.25
--- php-src/ext/session/session.c:1.417.2.8.2.24 Mon Jan  1  
09:36:06 2007

+++ php-src/ext/session/session.c Tue Jan  9 15:31:12 2007
@@ -17,7 +17,7 @@
+ 
--+

 */

-/* $Id: session.c,v 1.417.2.8.2.24 2007/01/01 09:36:06 sebastian  
Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.25 2007/01/09 15:31:12 iliaa Exp  
$ */


#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -331,6 +331,10 @@
 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 (sym_global == NULL && sym_track == NULL) {
 zval *empty_var;

@@ -360,7 +364,10 @@
 if (PG(register_globals)) {
 zval **old_symbol;
 if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void *) 
&old_symbol) == SUCCESS) {

-
+ if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && Z_ARRVAL_PP 
(old_symbol) == &EG(symbol_table)) || *old_symbol == PS 
(http_session_vars)) {

+ return;
+ }
+
 /*
 * A global symbol with the same name exists already. That
 * symbol might have been created by other means (e.g. $_GET).

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




Ilia Alshanetsky

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



[PHP-CVS] cvs: php-src /ext/spl php_spl.c spl_array.c /ext/spl/tests bug40036.phpt /main main.c php_main.h

2007-01-09 Thread Marcus Boerger
helly   Tue Jan  9 18:38:38 2007 UTC

  Modified files:  
/php-src/ext/splphp_spl.c spl_array.c 
/php-src/ext/spl/tests  bug40036.phpt 
/php-src/main   main.c php_main.h 
  Log:
  - MFH (Ilia's changes)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.106&r2=1.107&diff_format=u
Index: php-src/ext/spl/php_spl.c
diff -u php-src/ext/spl/php_spl.c:1.106 php-src/ext/spl/php_spl.c:1.107
--- php-src/ext/spl/php_spl.c:1.106 Mon Jan  1 09:29:29 2007
+++ php-src/ext/spl/php_spl.c   Tue Jan  9 18:38:38 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: php_spl.c,v 1.106 2007/01/01 09:29:29 sebastian Exp $ */
+/* $Id: php_spl.c,v 1.107 2007/01/09 18:38:38 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
#include "config.h"
@@ -24,6 +24,7 @@
 
 #include "php.h"
 #include "php_ini.h"
+#include "php_main.h"
 #include "ext/standard/info.h"
 #include "php_spl.h"
 #include "spl_functions.h"
@@ -212,24 +213,12 @@
zend_file_handle file_handle;
zend_op_array *new_op_array;
zval *result = NULL;
-   zval err_mode;
int ret;
 
/* UTODO: Wewant the stream toacept a zstrfor opening */
class_file_len = spprintf(&class_file, 0, "%v%v", lc_name, 
file_extension);
 
-   ZVAL_LONG(&err_mode, EG(error_reporting));
-   if (Z_LVAL(err_mode)) {
-   php_alter_ini_entry("error_reporting", 
sizeof("error_reporting"), "0", 1, ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
-   }
-
-   ret = zend_stream_open(class_file, &file_handle TSRMLS_CC);
-
-   if (!EG(error_reporting) && Z_LVAL(err_mode) != EG(error_reporting)) {
-   convert_to_string(&err_mode);
-   zend_alter_ini_entry("error_reporting", 
sizeof("error_reporting"), Z_STRVAL(err_mode), Z_STRLEN(err_mode), 
ZEND_INI_USER, ZEND_INI_STAGE_RUNTIME);
-   zendi_zval_dtor(err_mode);
-   }
+   ret = php_stream_open_for_zend_ex(class_file, &file_handle, 
ENFORCE_SAFE_MODE|USE_PATH|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC);
 
if (ret == SUCCESS) {
if (!file_handle.opened_path) {
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/spl_array.c?r1=1.116&r2=1.117&diff_format=u
Index: php-src/ext/spl/spl_array.c
diff -u php-src/ext/spl/spl_array.c:1.116 php-src/ext/spl/spl_array.c:1.117
--- php-src/ext/spl/spl_array.c:1.116   Tue Jan  2 18:15:22 2007
+++ php-src/ext/spl/spl_array.c Tue Jan  9 18:38:38 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: spl_array.c,v 1.116 2007/01/02 18:15:22 helly Exp $ */
+/* $Id: spl_array.c,v 1.117 2007/01/09 18:38:38 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 # include "config.h"
@@ -481,7 +481,16 @@
switch(Z_TYPE_P(offset)) {
case IS_STRING:
case IS_UNICODE:
-   return zend_u_symtable_exists(spl_array_get_hash_table(intern, 
0 TSRMLS_CC), Z_TYPE_P(offset), Z_UNIVAL_P(offset), Z_UNILEN_P(offset)+1);
+   if (check_empty) {
+   zval **tmp;
+   HashTable *ht = spl_array_get_hash_table(intern, 0 
TSRMLS_CC);
+   if (zend_u_hash_find(ht, Z_TYPE_P(offset), 
Z_UNIVAL_P(offset), Z_UNILEN_P(offset)+1, (void **) &tmp) != FAILURE && 
zend_is_true(*tmp)) {
+   return 1;
+   }
+   return 0;
+   } else {
+   return 
zend_u_symtable_exists(spl_array_get_hash_table(intern, 0 TSRMLS_CC), 
Z_TYPE_P(offset), Z_UNIVAL_P(offset), Z_UNILEN_P(offset)+1);
+   }
case IS_DOUBLE:
case IS_RESOURCE:
case IS_BOOL: 
@@ -491,7 +500,16 @@
} else {
index = Z_LVAL_P(offset);
}
-   return zend_hash_index_exists(spl_array_get_hash_table(intern, 
0 TSRMLS_CC), index);
+   if (check_empty) {
+   zval **tmp;
+   HashTable *ht = spl_array_get_hash_table(intern, 0 
TSRMLS_CC);
+   if (zend_hash_index_find(ht, index, (void **)&tmp) != 
FAILURE && zend_is_true(*tmp)) {
+   return 1;
+   }
+   return 0;
+   } else {
+   return 
zend_hash_index_exists(spl_array_get_hash_table(intern, 0 TSRMLS_CC), index);
+   }
default:
zend_error(E_WARNING, "Illegal offset type");
}
http://cvs.php.net/viewvc.cgi/php-src/ext/spl/tests/bug40036.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/spl/tests/bug40036.phpt
diff -u /dev/null php-src/ext/spl/tests/bug40036.phpt:1.2
--- /dev/null   Tue Jan  9 18:38:38 2007
+++ php-src/ext/spl/tests/bug40036.phpt Tue Jan  9 18:38:38 2007
@@ -0,0 +1,34 @@
+--TEST--
+Bug #40036 (empty() does not work correctly with ArrayObject when using 
ARRAY_AS_PROPS)
+--S

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

2007-01-09 Thread Marcus Boerger
helly   Tue Jan  9 18:35:32 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  - BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.481&r2=1.2027.2.547.2.482&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.481 php-src/NEWS:1.2027.2.547.2.482
--- php-src/NEWS:1.2027.2.547.2.481 Tue Jan  9 15:29:14 2007
+++ php-src/NEWSTue Jan  9 18:35:32 2007
@@ -37,6 +37,7 @@
   __inet_pton() and inet_ntop() was named __inet_ntop(). (Hannes)
 - Fixed the validate email filter so that the letter "v" can also be used in
   the user part of the email address. (Derick)
+- Fixed bug #40073 (exif_read_data dies on certain images). (Tony, Marcus)
 - Fixed bug #40012 (php_date.c doesnt compile on Netware). (gk at gknw dot de,
   Derick)
 - Fixed bug #40009 (http_build_query(array()) returns NULL). (Ilia)

-- 
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_2) /ext/session session.c

2007-01-09 Thread Nuno Lopes

I think this one needs a test..


- Original Message - 
From: "Ilia Alshanetsky" <[EMAIL PROTECTED]>

To: 
Sent: Tuesday, January 09, 2007 3:31 PM
Subject: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/session session.c



iliaa Tue Jan  9 15:31:12 2007 UTC

 Modified files:  (Branch: PHP_5_2)
   /php-src/ext/session session.c
 Log:

 Prevent SESSION/GLOBALS overload via session decoding


http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.24&r2=1.417.2.8.2.25&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.24 
php-src/ext/session/session.c:1.417.2.8.2.25

--- php-src/ext/session/session.c:1.417.2.8.2.24 Mon Jan  1 09:36:06 2007
+++ php-src/ext/session/session.c Tue Jan  9 15:31:12 2007
@@ -17,7 +17,7 @@

+--+
 */

-/* $Id: session.c,v 1.417.2.8.2.24 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.25 2007/01/09 15:31:12 iliaa Exp $ */

#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -331,6 +331,10 @@
 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 (sym_global == NULL && sym_track == NULL) {
 zval *empty_var;

@@ -360,7 +364,10 @@
 if (PG(register_globals)) {
 zval **old_symbol;
 if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void *)&old_symbol) 
== SUCCESS) {

-
+ if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && Z_ARRVAL_PP(old_symbol) == 
&EG(symbol_table)) || *old_symbol == PS(http_session_vars)) {

+ return;
+ }
+
 /*
 * A global symbol with the same name exists already. That
 * symbol might have been created by other means (e.g. $_GET).

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


--
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_2) /ext/gd gd.c php_gd.h

2007-01-09 Thread Nuno Lopes

On Mon, 8 Jan 2007, Nuno Lopes wrote:


nlopess Mon Jan  8 22:52:23 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/gd gd.c php_gd.h
  Log:
  avoid calling MSHUTDOWN when built without libt1


Is it really needed to clog the source code with those ifdefs? It's not
like this is a performance issue here...


I don't think this is "clogging" the code. I also think that any "free" 
speedup is welcome (even minor). Anyway this part of the code is rarely 
changed, so it shouldn't be any nightmare to maintain. (the ifdef was 
already there. I just moved it around)


Nuno 


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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/exif exif.c

2007-01-09 Thread Marcus Boerger
helly   Tue Jan  9 17:55:29 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/exif   exif.c 
  Log:
  - MFH Fix for #40073
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.173.2.5.2.9&r2=1.173.2.5.2.10&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.173.2.5.2.9 
php-src/ext/exif/exif.c:1.173.2.5.2.10
--- php-src/ext/exif/exif.c:1.173.2.5.2.9   Tue Jan  9 11:37:17 2007
+++ php-src/ext/exif/exif.c Tue Jan  9 17:55:29 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.173.2.5.2.9 2007/01/09 11:37:17 tony2001 Exp $ */
+/* $Id: exif.c,v 1.173.2.5.2.10 2007/01/09 17:55:29 helly Exp $ */
 
 /*  ToDos
  *
@@ -139,7 +139,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.9 2007/01/09 11:37:17 
tony2001 Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.10 2007/01/09 17:55:29 
helly Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1150,6 +1150,80 @@
 }
 /* }}} */
 
+#ifdef EXIF_DEBUG
+char * exif_dump_data(int *dump_free, int format, int components, int length, 
int motorola_intel, char *value_ptr TSRMLS_DC) /* {{{ */
+{
+   char *dump;
+   int len;
+
+   *dump_free = 0;
+   if (format == TAG_FMT_STRING) {
+   return value_ptr ? value_ptr : "";
+   }
+   if (format == TAG_FMT_UNDEFINED) {
+   return "\n";
+   }
+   if (format == TAG_FMT_IFD) {
+   return "";
+   }
+   if (format == TAG_FMT_SINGLE || format == TAG_FMT_DOUBLE) {
+   return "";
+   }
+   *dump_free = 1;
+   if (components > 1) {
+   len = spprintf(&dump, 0, "(%d,%d) {", components, length);
+   } else {
+   len = spprintf(&dump, 0, "{");
+   }
+   while(components > 0) {
+   switch(format) {
+   case TAG_FMT_BYTE:
+   case TAG_FMT_UNDEFINED:
+   case TAG_FMT_STRING:
+   case TAG_FMT_SBYTE:
+   dump = erealloc(dump, len + 4);
+   sprintf(dump + len, "0x%02X", *value_ptr);
+   len += 4;
+   value_ptr++;
+   break;
+   case TAG_FMT_USHORT:
+   case TAG_FMT_SSHORT:
+   dump = erealloc(dump, len + 6);
+   sprintf(dump + len, "0x%04X", 
php_ifd_get16s(value_ptr, motorola_intel));
+   len += 6;
+   value_ptr += 2;
+   break;
+   case TAG_FMT_ULONG:
+   case TAG_FMT_SLONG:
+   dump = erealloc(dump, len + 6);
+   sprintf(dump + len, "0x%04X", 
php_ifd_get32s(value_ptr, motorola_intel));
+   len += 6;
+   value_ptr += 4;
+   break;
+   case TAG_FMT_URATIONAL:
+   case TAG_FMT_SRATIONAL:
+   dump = erealloc(dump, len + 13);
+   sprintf(dump + len, "0x%04X/0x%04X", 
php_ifd_get32s(value_ptr, motorola_intel), php_ifd_get32s(value_ptr+4, 
motorola_intel));
+   len += 13;
+   value_ptr += 8;
+   break;
+   }
+   if (components > 0) {
+   dump = erealloc(dump, len + 2);
+   sprintf(dump + len, ", ");
+   len += 2;   
+   components--;
+   } else{
+   break;
+   }
+   }
+   dump = erealloc(dump, len + 2);
+   sprintf(dump + len, "}");
+   return dump;
+}
+/* }}} */
+#endif
+
 /* {{{ exif_convert_any_format
  * Evaluate number, be it int, rational, or float from directory. */
 static double exif_convert_any_format(void *value, int format, int 
motorola_intel TSRMLS_DC)
@@ -2747,10 +2821,14 @@
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t byte_count, offset_val, fpos, fgot;
xp_field_type *tmp_xp;
+#ifdef EXIF_DEBUG
+   char *dump_data;
+   int dump_free;
+#endif /* EXIF_DEBUG */
 
/* Protect against corrupt headers */
if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
-   exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, 
ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level 
reached");
+   exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, 
ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level 
reached");
return FALSE;
}
ImageInfo

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

2007-01-09 Thread Marcus Boerger
helly   Tue Jan  9 17:52:02 2007 UTC

  Modified files:  
/php-src/ext/exif   exif.c 
  Log:
  - Improve debugging and fix #40073
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.190&r2=1.191&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.190 php-src/ext/exif/exif.c:1.191
--- php-src/ext/exif/exif.c:1.190   Tue Jan  9 11:37:05 2007
+++ php-src/ext/exif/exif.c Tue Jan  9 17:52:02 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ */
+/* $Id: exif.c,v 1.191 2007/01/09 17:52:02 helly Exp $ */
 
 /*  ToDos
  *
@@ -139,7 +139,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp 
$"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.191 2007/01/09 17:52:02 helly Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1150,6 +1150,80 @@
 }
 /* }}} */
 
+#ifdef EXIF_DEBUG
+char * exif_dump_data(int *dump_free, int format, int components, int length, 
int motorola_intel, char *value_ptr TSRMLS_DC) /* {{{ */
+{
+   char *dump;
+   int len;
+
+   *dump_free = 0;
+   if (format == TAG_FMT_STRING) {
+   return value_ptr ? value_ptr : "";
+   }
+   if (format == TAG_FMT_UNDEFINED) {
+   return "\n";
+   }
+   if (format == TAG_FMT_IFD) {
+   return "";
+   }
+   if (format == TAG_FMT_SINGLE || format == TAG_FMT_DOUBLE) {
+   return "";
+   }
+   *dump_free = 1;
+   if (components > 1) {
+   len = spprintf(&dump, 0, "(%d,%d) {", components, length);
+   } else {
+   len = spprintf(&dump, 0, "{");
+   }
+   while(components > 0) {
+   switch(format) {
+   case TAG_FMT_BYTE:
+   case TAG_FMT_UNDEFINED:
+   case TAG_FMT_STRING:
+   case TAG_FMT_SBYTE:
+   dump = erealloc(dump, len + 4);
+   sprintf(dump + len, "0x%02X", *value_ptr);
+   len += 4;
+   value_ptr++;
+   break;
+   case TAG_FMT_USHORT:
+   case TAG_FMT_SSHORT:
+   dump = erealloc(dump, len + 6);
+   sprintf(dump + len, "0x%04X", 
php_ifd_get16s(value_ptr, motorola_intel));
+   len += 6;
+   value_ptr += 2;
+   break;
+   case TAG_FMT_ULONG:
+   case TAG_FMT_SLONG:
+   dump = erealloc(dump, len + 6);
+   sprintf(dump + len, "0x%04X", 
php_ifd_get32s(value_ptr, motorola_intel));
+   len += 6;
+   value_ptr += 4;
+   break;
+   case TAG_FMT_URATIONAL:
+   case TAG_FMT_SRATIONAL:
+   dump = erealloc(dump, len + 13);
+   sprintf(dump + len, "0x%04X/0x%04X", 
php_ifd_get32s(value_ptr, motorola_intel), php_ifd_get32s(value_ptr+4, 
motorola_intel));
+   len += 13;
+   value_ptr += 8;
+   break;
+   }
+   if (components > 0) {
+   dump = erealloc(dump, len + 2);
+   sprintf(dump + len, ", ");
+   len += 2;   
+   components--;
+   } else{
+   break;
+   }
+   }
+   dump = erealloc(dump, len + 2);
+   sprintf(dump + len, "}");
+   return dump;
+}
+/* }}} */
+#endif
+
 /* {{{ exif_convert_any_format
  * Evaluate number, be it int, rational, or float from directory. */
 static double exif_convert_any_format(void *value, int format, int 
motorola_intel TSRMLS_DC)
@@ -2726,10 +2800,14 @@
char *value_ptr, tagname[64], cbuf[32], *outside=NULL;
size_t byte_count, offset_val, fpos, fgot;
xp_field_type *tmp_xp;
+#ifdef EXIF_DEBUG
+   char *dump_data;
+   int dump_free;
+#endif /* EXIF_DEBUG */
 
/* Protect against corrupt headers */
if (ImageInfo->ifd_nesting_level > MAX_IFD_NESTING_LEVEL) {
-   exif_error_docref("exif_read_data#error_ifd" TSRMLS_CC, 
ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level 
reached");
+   exif_error_docref("exif_read_data#error_ifd" EXIFERR_CC, 
ImageInfo, E_WARNING, "corrupt EXIF header: maximum directory nesting level 
reached");
return FALSE;
}
ImageInfo->ifd_nesting_level++;
@@ -2814,7 +2892,11 @@
 
ImageInfo->sections_found

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

2007-01-09 Thread Dmitry Stogov
dmitry  Tue Jan  9 16:27:32 2007 UTC

  Modified files:  
/php-src/ext/standard   proc_open.c 
  Log:
  Close open files in case of failure (Amit)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.50&r2=1.51&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.50 
php-src/ext/standard/proc_open.c:1.51
--- php-src/ext/standard/proc_open.c:1.50   Sat Jan  6 09:08:06 2007
+++ php-src/ext/standard/proc_open.cTue Jan  9 16:27:32 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: proc_open.c,v 1.50 2007/01/06 09:08:06 dmitry Exp $ */
+/* $Id: proc_open.c,v 1.51 2007/01/09 16:27:32 dmitry Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE   /* linux wants this when XOPEN mode is on */
@@ -748,6 +748,13 @@
}

if (FALSE == newprocok) {
+   /* clean up all the descriptors */
+   for (i = 0; i < ndesc; i++) {
+   CloseHandle(descriptors[i].childend);
+   if (descriptors[i].parentend) {
+   CloseHandle(descriptors[i].parentend);
+   }
+   }
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess 
failed");
goto exit_fail;
}

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/standard proc_open.c

2007-01-09 Thread Dmitry Stogov
dmitry  Tue Jan  9 16:27:17 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/standard   proc_open.c 
  Log:
  Close open files in case of failure (Amit)
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.7&r2=1.36.2.1.2.8&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.7 
php-src/ext/standard/proc_open.c:1.36.2.1.2.8
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.7   Sat Jan  6 09:02:02 2007
+++ php-src/ext/standard/proc_open.cTue Jan  9 16:27:17 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]>   |
+--+
  */
-/* $Id: proc_open.c,v 1.36.2.1.2.7 2007/01/06 09:02:02 dmitry Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.8 2007/01/09 16:27:17 dmitry Exp $ */
 
 #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
 # define _BSD_SOURCE   /* linux wants this when XOPEN mode is on */
@@ -755,6 +755,13 @@
}

if (FALSE == newprocok) {
+   /* clean up all the descriptors */
+   for (i = 0; i < ndesc; i++) {
+   CloseHandle(descriptors[i].childend);
+   if (descriptors[i].parentend) {
+   CloseHandle(descriptors[i].parentend);
+   }
+   }
php_error_docref(NULL TSRMLS_CC, E_WARNING, "CreateProcess 
failed");
goto exit_fail;
}

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



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

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 15:31:36 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/sessionsession.c 
  Log:
  
  MFH: Prevent SESSION/GLOBALS overload via session decoding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.336.2.53.2.12&r2=1.336.2.53.2.13&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.336.2.53.2.12 
php-src/ext/session/session.c:1.336.2.53.2.13
--- php-src/ext/session/session.c:1.336.2.53.2.12   Mon Jan  1 09:46:47 2007
+++ php-src/ext/session/session.c   Tue Jan  9 15:31:36 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.336.2.53.2.12 2007/01/01 09:46:47 sebastian Exp $ */
+/* $Id: session.c,v 1.336.2.53.2.13 2007/01/09 15:31:36 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -284,6 +284,10 @@
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 (sym_global == NULL && sym_track == NULL) {
zval *empty_var;
 
@@ -313,7 +317,10 @@
if (PG(register_globals)) {
zval **old_symbol;
if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void 
*)&old_symbol) == SUCCESS) { 
-   
+   if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && 
Z_ARRVAL_PP(old_symbol) == &EG(symbol_table)) || *old_symbol == 
PS(http_session_vars)) {
+   return;
+   }
+
/* 
 * A global symbol with the same name exists already. 
That
 * symbol might have been created by other means (e.g. 
$_GET).

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



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

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 15:31:12 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/sessionsession.c 
  Log:
  
  Prevent SESSION/GLOBALS overload via session decoding
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.24&r2=1.417.2.8.2.25&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.24 
php-src/ext/session/session.c:1.417.2.8.2.25
--- php-src/ext/session/session.c:1.417.2.8.2.24Mon Jan  1 09:36:06 2007
+++ php-src/ext/session/session.c   Tue Jan  9 15:31:12 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.24 2007/01/01 09:36:06 sebastian Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.25 2007/01/09 15:31:12 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -331,6 +331,10 @@
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 (sym_global == NULL && sym_track == NULL) {
zval *empty_var;
 
@@ -360,7 +364,10 @@
if (PG(register_globals)) {
zval **old_symbol;
if (zend_hash_find(&EG(symbol_table),name,namelen+1,(void 
*)&old_symbol) == SUCCESS) { 
-   
+   if ((Z_TYPE_PP(old_symbol) == IS_ARRAY && 
Z_ARRVAL_PP(old_symbol) == &EG(symbol_table)) || *old_symbol == 
PS(http_session_vars)) {
+   return;
+   }
+
/* 
 * A global symbol with the same name exists already. 
That
 * symbol might have been created by other means (e.g. 
$_GET).

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



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

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 15:21:23 2007 UTC

  Modified files:  
/php-src/ext/wddx   wddx.c 
  Log:
  
  MFB: Added key_length intialization for intergers
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.141&r2=1.142&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.141 php-src/ext/wddx/wddx.c:1.142
--- php-src/ext/wddx/wddx.c:1.141   Mon Jan  1 09:29:33 2007
+++ php-src/ext/wddx/wddx.c Tue Jan  9 15:21:23 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.141 2007/01/01 09:29:33 sebastian Exp $ */
+/* $Id: wddx.c,v 1.142 2007/01/09 15:21:23 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -285,7 +285,7 @@
 
switch (hash_type) {
case HASH_KEY_IS_LONG:
-   sprintf(tmp, "%ld", idx);
+   key_length = sprintf(tmp, "%ld", idx) + 
1;
key = tmp;
/* fallthru */
case HASH_KEY_IS_STRING:

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/wddx wddx.c

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 15:21:08 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/wddx   wddx.c 
  Log:
  
  MFH: Added key_length intialization for intergers
  
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.96.2.6.2.9&r2=1.96.2.6.2.10&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.96.2.6.2.9 
php-src/ext/wddx/wddx.c:1.96.2.6.2.10
--- php-src/ext/wddx/wddx.c:1.96.2.6.2.9Mon Jan  1 09:46:49 2007
+++ php-src/ext/wddx/wddx.c Tue Jan  9 15:21:08 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.96.2.6.2.9 2007/01/01 09:46:49 sebastian Exp $ */
+/* $Id: wddx.c,v 1.96.2.6.2.10 2007/01/09 15:21:08 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -289,7 +289,7 @@
 
switch (hash_type) {
case HASH_KEY_IS_LONG:
-   sprintf(tmp, "%ld", idx);
+   key_length = sprintf(tmp, "%ld", idx) + 
1;
key = tmp;
/* fallthru */
case HASH_KEY_IS_STRING:

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/wddx wddx.c

2007-01-09 Thread Ilia Alshanetsky
iliaa   Tue Jan  9 15:20:45 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/wddx   wddx.c 
  Log:
  Added key_length intialization for intergers
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/wddx/wddx.c?r1=1.119.2.10.2.8&r2=1.119.2.10.2.9&diff_format=u
Index: php-src/ext/wddx/wddx.c
diff -u php-src/ext/wddx/wddx.c:1.119.2.10.2.8 
php-src/ext/wddx/wddx.c:1.119.2.10.2.9
--- php-src/ext/wddx/wddx.c:1.119.2.10.2.8  Mon Jan  1 09:36:09 2007
+++ php-src/ext/wddx/wddx.c Tue Jan  9 15:20:45 2007
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: wddx.c,v 1.119.2.10.2.8 2007/01/01 09:36:09 sebastian Exp $ */
+/* $Id: wddx.c,v 1.119.2.10.2.9 2007/01/09 15:20:45 iliaa Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -284,7 +284,7 @@
 
switch (hash_type) {
case HASH_KEY_IS_LONG:
-   sprintf(tmp, "%ld", idx);
+   key_length = sprintf(tmp, "%ld", idx) + 
1;
key = tmp;
/* fallthru */
case HASH_KEY_IS_STRING:

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



[PHP-CVS] cvs: php-src(PHP_4_4) /ext/exif exif.c

2007-01-09 Thread Antony Dovgal
tony2001Tue Jan  9 11:38:04 2007 UTC

  Modified files:  (Branch: PHP_4_4)
/php-src/ext/exif   exif.c 
  Log:
  MFH: zerofill info_data
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.118.2.37.2.6&r2=1.118.2.37.2.7&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.118.2.37.2.6 
php-src/ext/exif/exif.c:1.118.2.37.2.7
--- php-src/ext/exif/exif.c:1.118.2.37.2.6  Mon Jan  1 09:46:41 2007
+++ php-src/ext/exif/exif.c Tue Jan  9 11:38:04 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.118.2.37.2.6 2007/01/01 09:46:41 sebastian Exp $ */
+/* $Id: exif.c,v 1.118.2.37.2.7 2007/01/09 11:38:04 tony2001 Exp $ */
 
 /*  ToDos
  *
@@ -107,7 +107,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.37.2.6 2007/01/01 09:46:41 
sebastian Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.118.2.37.2.7 2007/01/09 11:38:04 
tony2001 Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1550,6 +1550,7 @@
image_info->info_list[section_index].list = list;
 
info_data  = 
&image_info->info_list[section_index].list[image_info->info_list[section_index].count];
+   memset(info_data, 0, sizeof(image_info_data));
info_data->tag= tag;
info_data->format = format;
info_data->length = length;

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



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/exif exif.c

2007-01-09 Thread Antony Dovgal
tony2001Tue Jan  9 11:37:17 2007 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/exif   exif.c 
  Log:
  MFH: zerofill info_data and fix possible segfault
  partly fixes #40073
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.173.2.5.2.8&r2=1.173.2.5.2.9&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.173.2.5.2.8 
php-src/ext/exif/exif.c:1.173.2.5.2.9
--- php-src/ext/exif/exif.c:1.173.2.5.2.8   Mon Jan  1 09:36:00 2007
+++ php-src/ext/exif/exif.c Tue Jan  9 11:37:17 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.173.2.5.2.8 2007/01/01 09:36:00 sebastian Exp $ */
+/* $Id: exif.c,v 1.173.2.5.2.9 2007/01/09 11:37:17 tony2001 Exp $ */
 
 /*  ToDos
  *
@@ -139,7 +139,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.8 2007/01/01 09:36:00 
sebastian Exp $"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.173.2.5.2.9 2007/01/09 11:37:17 
tony2001 Exp $"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1599,6 +1599,7 @@
image_info->info_list[section_index].list = list;
 
info_data  = 
&image_info->info_list[section_index].list[image_info->info_list[section_index].count];
+   memset(info_data, 0, sizeof(image_info_data));
info_data->tag= tag;
info_data->format = format;
info_data->length = length;

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



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

2007-01-09 Thread Antony Dovgal
tony2001Tue Jan  9 11:37:05 2007 UTC

  Modified files:  
/php-src/ext/exif   exif.c 
  Log:
  zerofill info_data and fix possible segfault
  partly fixes #40073
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/exif/exif.c?r1=1.189&r2=1.190&diff_format=u
Index: php-src/ext/exif/exif.c
diff -u php-src/ext/exif/exif.c:1.189 php-src/ext/exif/exif.c:1.190
--- php-src/ext/exif/exif.c:1.189   Wed Jan  3 20:49:27 2007
+++ php-src/ext/exif/exif.c Tue Jan  9 11:37:05 2007
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp $ */
+/* $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp $ */
 
 /*  ToDos
  *
@@ -139,7 +139,7 @@
 };
 /* }}} */
 
-#define EXIF_VERSION "1.4 $Id: exif.c,v 1.189 2007/01/03 20:49:27 tony2001 Exp 
$"
+#define EXIF_VERSION "1.4 $Id: exif.c,v 1.190 2007/01/09 11:37:05 tony2001 Exp 
$"
 
 /* {{{ PHP_MINFO_FUNCTION
  */
@@ -1599,6 +1599,7 @@
image_info->info_list[section_index].list = list;
 
info_data  = 
&image_info->info_list[section_index].list[image_info->info_list[section_index].count];
+   memset(info_data, 0, sizeof(image_info_data));
info_data->tag= tag;
info_data->format = format;
info_data->length = length;

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