[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS /ext/standard basic_functions.c
dmitry Mon Oct 22 07:37:21 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/standard basic_functions.c Log: Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK (Andrew Sitnikov) http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.982r2=1.2027.2.547.2.983diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.982 php-src/NEWS:1.2027.2.547.2.983 --- php-src/NEWS:1.2027.2.547.2.982 Fri Oct 19 05:35:05 2007 +++ php-src/NEWSMon Oct 22 07:37:20 2007 @@ -11,6 +11,8 @@ array_uintersect_assoc(), array_diff_key(), array_diff_assoc() and array_udiff_assoc(). (Dmitry) +- Fixed move_uploaded_file() to set file permissions of resulting file + according to UMASK (Andrew Sitnikov) - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf) - Fixed regression in glob() when enforcing safe_mode/open_basedir checks on paths containing '*'. (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.65r2=1.725.2.31.2.66diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.65 php-src/ext/standard/basic_functions.c:1.725.2.31.2.66 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.65 Thu Oct 4 13:31:10 2007 +++ php-src/ext/standard/basic_functions.c Mon Oct 22 07:37:20 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.65 2007/10/04 13:31:10 jani Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.66 2007/10/22 07:37:20 dmitry Exp $ */ #include php.h #include php_streams.h @@ -50,6 +50,11 @@ #include time.h #include stdio.h +#ifndef PHP_WIN32 +#include sys/types.h +#include sys/stat.h +#endif + #ifdef NETWARE #include netinet/in.h #endif @@ -6075,6 +6080,10 @@ zval **path, **new_path; zend_bool successful = 0; +#ifndef PHP_WIN32 + int oldmask; int ret; +#endif + if (!SG(rfc1867_uploaded_files)) { RETURN_FALSE; } @@ -6100,6 +6109,16 @@ VCWD_UNLINK(Z_STRVAL_PP(new_path)); if (VCWD_RENAME(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path)) == 0) { successful = 1; +#ifndef PHP_WIN32 + oldmask = umask(077); + umask(oldmask); + + ret = VCWD_CHMOD(Z_STRVAL_PP(new_path), 0666 ~oldmask); + + if (ret == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); + } +#endif } else if (php_copy_file_ex(Z_STRVAL_PP(path), Z_STRVAL_PP(new_path), STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { VCWD_UNLINK(Z_STRVAL_PP(path)); successful = 1; -- 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/standard basic_functions.c
dmitry Mon Oct 22 07:37:37 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/standard basic_functions.c Log: Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK (Andrew Sitnikov) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.725.2.31.2.64.2.7r2=1.725.2.31.2.64.2.8diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.7 php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.8 --- php-src/ext/standard/basic_functions.c:1.725.2.31.2.64.2.7 Sun Oct 7 05:22:06 2007 +++ php-src/ext/standard/basic_functions.c Mon Oct 22 07:37:37 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.7 2007/10/07 05:22:06 davidw Exp $ */ +/* $Id: basic_functions.c,v 1.725.2.31.2.64.2.8 2007/10/22 07:37:37 dmitry Exp $ */ #include php.h #include php_streams.h @@ -53,6 +53,11 @@ #include time.h #include stdio.h +#ifndef PHP_WIN32 +#include sys/types.h +#include sys/stat.h +#endif + #ifdef NETWARE #include netinet/in.h #endif @@ -6061,6 +6066,10 @@ int path_len, new_path_len; zend_bool successful = 0; +#ifndef PHP_WIN32 + int oldmask; int ret; +#endif + if (!SG(rfc1867_uploaded_files)) { RETURN_FALSE; } @@ -6084,6 +6093,16 @@ VCWD_UNLINK(new_path); if (VCWD_RENAME(path, new_path) == 0) { successful = 1; +#ifndef PHP_WIN32 + oldmask = umask(077); + umask(oldmask); + + ret = VCWD_CHMOD(new_path, 0666 ~oldmask); + + if (ret == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); + } +#endif } else if (php_copy_file_ex(path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { VCWD_UNLINK(path); successful = 1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard basic_functions.c
dmitry Mon Oct 22 07:37:52 2007 UTC Modified files: /php-src/ext/standard basic_functions.c Log: Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK (Andrew Sitnikov) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/basic_functions.c?r1=1.879r2=1.880diff_format=u Index: php-src/ext/standard/basic_functions.c diff -u php-src/ext/standard/basic_functions.c:1.879 php-src/ext/standard/basic_functions.c:1.880 --- php-src/ext/standard/basic_functions.c:1.879Sun Oct 7 05:15:06 2007 +++ php-src/ext/standard/basic_functions.c Mon Oct 22 07:37:52 2007 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: basic_functions.c,v 1.879 2007/10/07 05:15:06 davidw Exp $ */ +/* $Id: basic_functions.c,v 1.880 2007/10/22 07:37:52 dmitry Exp $ */ #include php.h #include php_streams.h @@ -52,6 +52,11 @@ #include time.h #include stdio.h +#ifndef PHP_WIN32 +#include sys/types.h +#include sys/stat.h +#endif + #ifdef NETWARE #include netinet/in.h #endif @@ -6050,6 +6055,10 @@ zval **pp_new_path; zend_bool successful = 0; +#ifndef PHP_WIN32 + int oldmask; int ret; +#endif + if (!SG(rfc1867_uploaded_files)) { RETURN_FALSE; } @@ -6079,6 +6088,16 @@ VCWD_UNLINK(new_path); if (VCWD_RENAME(old_path, new_path) == 0) { successful = 1; +#ifndef PHP_WIN32 + oldmask = umask(077); + umask(oldmask); + + ret = VCWD_CHMOD(new_path, 0666 ~oldmask); + + if (ret == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, %s, strerror(errno)); + } +#endif } else if (php_copy_file_ex(old_path, new_path, STREAM_DISABLE_OPEN_BASEDIR TSRMLS_CC) == SUCCESS) { VCWD_UNLINK(old_path); successful = 1; -- 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
dmitry Mon Oct 22 07:52:03 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: forgotten description http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.983r2=1.2027.2.547.2.984diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.983 php-src/NEWS:1.2027.2.547.2.984 --- php-src/NEWS:1.2027.2.547.2.983 Mon Oct 22 07:37:20 2007 +++ php-src/NEWSMon Oct 22 07:52:03 2007 @@ -11,7 +11,7 @@ array_uintersect_assoc(), array_diff_key(), array_diff_assoc() and array_udiff_assoc(). (Dmitry) -- Fixed move_uploaded_file() to set file permissions of resulting file +- Fixed move_uploaded_file() to always set file permissions of resulting file according to UMASK (Andrew Sitnikov) - Fixed possible crash in ext/soap because of uninitialized value. (Zdash Urf) - Fixed regression in glob() when enforcing safe_mode/open_basedir checks on -- 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/mysqli mysqli.c
andrey Mon Oct 22 10:35:33 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mysqli mysqli.c Log: Make it compile with libmysql 3.23 http://cvs.php.net/viewvc.cgi/php-src/ext/mysqli/mysqli.c?r1=1.72.2.16.2.20r2=1.72.2.16.2.21diff_format=u Index: php-src/ext/mysqli/mysqli.c diff -u php-src/ext/mysqli/mysqli.c:1.72.2.16.2.20 php-src/ext/mysqli/mysqli.c:1.72.2.16.2.21 --- php-src/ext/mysqli/mysqli.c:1.72.2.16.2.20 Wed Oct 17 08:19:50 2007 +++ php-src/ext/mysqli/mysqli.c Mon Oct 22 10:35:33 2007 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli.c,v 1.72.2.16.2.20 2007/10/17 08:19:50 tony2001 Exp $ + $Id: mysqli.c,v 1.72.2.16.2.21 2007/10/22 10:35:33 andrey Exp $ */ #ifdef HAVE_CONFIG_H @@ -494,6 +494,12 @@ REGISTER_INI_ENTRIES(); +#if MYSQL_VERSION_ID = 4 + if (mysql_server_init(0, NULL, NULL)) { + return FAILURE; + } +#endif + memcpy(mysqli_object_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers)); mysqli_object_handlers.clone_obj = NULL; mysqli_object_handlers.read_property = mysqli_read_property; @@ -651,10 +657,6 @@ REGISTER_LONG_CONSTANT(MYSQLI_REPORT_ALL, MYSQLI_REPORT_ALL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT(MYSQLI_REPORT_OFF, 0, CONST_CS | CONST_PERSISTENT); - if (mysql_server_init(0, NULL, NULL)) { - return FAILURE; - } - return SUCCESS; } /* }}} */ @@ -663,6 +665,7 @@ */ PHP_MSHUTDOWN_FUNCTION(mysqli) { +#if MYSQL_VERSION_ID = 4 #ifdef PHP_WIN32 unsigned long client_ver = mysql_get_client_version(); /* Can't call mysql_server_end() multiple times prior to 5.0.42 on Windows */ @@ -672,6 +675,7 @@ #else mysql_server_end(); #endif +#endif zend_hash_destroy(mysqli_driver_properties); zend_hash_destroy(mysqli_result_properties); @@ -689,7 +693,7 @@ */ PHP_RINIT_FUNCTION(mysqli) { -#ifdef ZTS +#ifdef ZTS MYSQL_VERSION_ID = 4 if (mysql_thread_init()) { return FAILURE; } @@ -705,7 +709,7 @@ */ PHP_RSHUTDOWN_FUNCTION(mysqli) { -#ifdef ZTS +#ifdef ZTS MYSQL_VERSION_ID = 4 mysql_thread_end(); #endif if (MyG(error_msg)) { -- 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/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:13:50 2007 UTC Added files: (Branch: PHP_5_2) /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcase for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_object.phpt +++ php-src/ext/standard/tests/array/array_filter_object.phpt -- 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/standard/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:16:03 2007 UTC Added files: (Branch: PHP_5_3) /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?view=markuprev=1.1 Index: php-src/ext/standard/tests/array/array_filter_object.phpt +++ php-src/ext/standard/tests/array/array_filter_object.phpt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/standard/tests/array array_filter_object.phpt
kraghubaMon Oct 22 11:17:18 2007 UTC Modified files: /php-src/ext/standard/tests/array array_filter_object.phpt Log: more testcases for array_filter() function http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/array/array_filter_object.phpt?r1=1.1r2=1.2diff_format=u Index: php-src/ext/standard/tests/array/array_filter_object.phpt diff -u /dev/null php-src/ext/standard/tests/array/array_filter_object.phpt:1.2 --- /dev/null Mon Oct 22 11:17:18 2007 +++ php-src/ext/standard/tests/array/array_filter_object.phpt Mon Oct 22 11:17:18 2007 @@ -0,0 +1,210 @@ +--TEST-- +Test array_filter() function : object functionality +--FILE-- +?php +/* Prototype : array array_filter(array $input [, callback $callback]) + * Description: Filters elements from the array via the callback. + * Source code: ext/standard/array.c +*/ + +/* This file uses 'input' array with different types of objects and passes + * it to array_filter() to test object functionality + * i.e. object of simple class with members and functions + * object of empty class + * object of child class extending abstract class + * object of class containing static member + */ + +echo *** Testing array_filter() : object functionality ***\n; + +// simple class with members - variable and method +class SimpleClass +{ + public $var1 = 10; + public function check() { +return $var1; + } +} + +// class without members +class EmptyClass +{ +} + +// abstract class +abstract class AbstractClass +{ + protected $var2 = 5; + abstract function emptyMethod(); +} + +// class deriving above abstract class +class ChildClass extends AbstractClass +{ + private $var3; + public function emptyMethod() { +echo defined in child; + } +} + +// class with final method +class FinalClass +{ + private $var4; + final function finalMethod() { +echo 'This can not be overloaded'; + } +} + +// class with static members +class StaticClass +{ + static $var5 = 5; + public static function staticMethod() { +echo 'this is static method'; + } +} + +// Callback function which returns always true +function always_true($input) +{ + return true; +} + +// Callback function which returns always false +function always_false($input) +{ + return false; +} + +// 'input' array containing objects as elements +$input = array( + new SimpleClass(), + new EmptyClass(), + new ChildClass(), + new FinalClass(), + new StaticClass() +); + + +// with default callback +var_dump( array_filter($input) ); + +// with always_true callback function +var_dump( array_filter($input, always_true) ); + +// with always_false callback function +var_dump( array_filter($input, always_false) ); + +echo Done +? +--EXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[var1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[var3:ChildClass:private]= +NULL +[var2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[var4:FinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done +--UEXPECTF-- +*** Testing array_filter() : object functionality *** +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[uvar1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[uvar3:uChildClass:private]= +NULL +[uvar2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[uvar4:uFinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(5) { + [0]= + object(SimpleClass)#%d (1) { +[uvar1]= +int(10) + } + [1]= + object(EmptyClass)#%d (0) { + } + [2]= + object(ChildClass)#%d (2) { +[uvar3:uChildClass:private]= +NULL +[uvar2:protected]= +int(5) + } + [3]= + object(FinalClass)#%d (1) { +[uvar4:uFinalClass:private]= +NULL + } + [4]= + object(StaticClass)#%d (0) { + } +} +array(0) { +} +Done -- 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/mssql php_mssql.c
iliaa Mon Oct 22 22:42:43 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/mssql php_mssql.c Log: Fixed bug #4294 (Move *timeout initialization from RINIT to connect time) http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.152.2.13.2.4.2.1r2=1.152.2.13.2.4.2.2diff_format=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.152.2.13.2.4.2.1 php-src/ext/mssql/php_mssql.c:1.152.2.13.2.4.2.2 --- php-src/ext/mssql/php_mssql.c:1.152.2.13.2.4.2.1Thu Sep 27 18:00:41 2007 +++ php-src/ext/mssql/php_mssql.c Mon Oct 22 22:42:43 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.152.2.13.2.4.2.1 2007/09/27 18:00:41 dmitry Exp $ */ +/* $Id: php_mssql.c,v 1.152.2.13.2.4.2.2 2007/10/22 22:42:43 iliaa Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -345,9 +345,7 @@ MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) 1) MS_SQL_G(connect_timeout) = 1; - dbsetlogintime(MS_SQL_G(connect_timeout)); if (MS_SQL_G(timeout) 0) MS_SQL_G(timeout) = 60; - dbsettime(MS_SQL_G(timeout)); if (MS_SQL_G(max_procs) != -1) { dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); } @@ -468,6 +466,9 @@ RETURN_FALSE; } + dbsetlogintime(MS_SQL_G(connect_timeout)); + dbsettime(MS_SQL_G(timeout)); + /* set a DBLOGIN record */ if ((mssql.login = dblogin()) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to allocate login record); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mssql php_mssql.c
iliaa Mon Oct 22 22:42:54 2007 UTC Modified files: /php-src/ext/mssql php_mssql.c Log: MFB: Fixed bug #4294 (Move *timeout initialization from RINIT to connect time) http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.170r2=1.171diff_format=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.170 php-src/ext/mssql/php_mssql.c:1.171 --- php-src/ext/mssql/php_mssql.c:1.170 Thu Sep 27 18:28:40 2007 +++ php-src/ext/mssql/php_mssql.c Mon Oct 22 22:42:54 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.170 2007/09/27 18:28:40 dmitry Exp $ */ +/* $Id: php_mssql.c,v 1.171 2007/10/22 22:42:54 iliaa Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -345,9 +345,7 @@ MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) 1) MS_SQL_G(connect_timeout) = 1; - dbsetlogintime(MS_SQL_G(connect_timeout)); if (MS_SQL_G(timeout) 0) MS_SQL_G(timeout) = 60; - dbsettime(MS_SQL_G(timeout)); if (MS_SQL_G(max_procs) != -1) { dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); } @@ -468,6 +466,9 @@ RETURN_FALSE; } + dbsetlogintime(MS_SQL_G(connect_timeout)); + dbsettime(MS_SQL_G(timeout)); + /* set a DBLOGIN record */ if ((mssql.login = dblogin()) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to allocate login record); -- 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/mssql php_mssql.c
iliaa Mon Oct 22 22:43:44 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/mssql php_mssql.c /php-srcNEWS Log: MFB: Fixed bug #4294 (Move *timeout initialization from RINIT to connect time) http://cvs.php.net/viewvc.cgi/php-src/ext/mssql/php_mssql.c?r1=1.152.2.13.2.4r2=1.152.2.13.2.5diff_format=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.152.2.13.2.4 php-src/ext/mssql/php_mssql.c:1.152.2.13.2.5 --- php-src/ext/mssql/php_mssql.c:1.152.2.13.2.4Sat Feb 24 02:17:25 2007 +++ php-src/ext/mssql/php_mssql.c Mon Oct 22 22:43:44 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.152.2.13.2.4 2007/02/24 02:17:25 helly Exp $ */ +/* $Id: php_mssql.c,v 1.152.2.13.2.5 2007/10/22 22:43:44 iliaa Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -345,9 +345,7 @@ MS_SQL_G(min_error_severity) = MS_SQL_G(cfg_min_error_severity); MS_SQL_G(min_message_severity) = MS_SQL_G(cfg_min_message_severity); if (MS_SQL_G(connect_timeout) 1) MS_SQL_G(connect_timeout) = 1; - dbsetlogintime(MS_SQL_G(connect_timeout)); if (MS_SQL_G(timeout) 0) MS_SQL_G(timeout) = 60; - dbsettime(MS_SQL_G(timeout)); if (MS_SQL_G(max_procs) != -1) { dbsetmaxprocs((TDS_SHORT)MS_SQL_G(max_procs)); } @@ -468,6 +466,9 @@ RETURN_FALSE; } + dbsetlogintime(MS_SQL_G(connect_timeout)); + dbsettime(MS_SQL_G(timeout)); + /* set a DBLOGIN record */ if ((mssql.login = dblogin()) == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, Unable to allocate login record); http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.984r2=1.2027.2.547.2.985diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.984 php-src/NEWS:1.2027.2.547.2.985 --- php-src/NEWS:1.2027.2.547.2.984 Mon Oct 22 07:52:03 2007 +++ php-src/NEWSMon Oct 22 22:43:44 2007 @@ -39,6 +39,8 @@ - Fixed bug #43020 (Warning message is missing with shuffle() and more than one argument). (Scott) +- Fixed bug #4294 (Move *timeout initialization from RINIT to connect time). + (Ilia) - Fixed bug #42917 (PDO::FETCH_KEY_PAIR doesn't work with setFetchMode). (Ilia) - Fixed bug #42890 (Constant LIST defined by mysqlclient and c-client). -- 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/gd/libgd gd_security.c
mattias Tue Oct 23 01:58:09 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/gd/libgd gd_security.c Log: - Be paranoid and dont allow multiplication with zero http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_security.c?r1=1.1.2.2r2=1.1.2.3diff_format=u Index: php-src/ext/gd/libgd/gd_security.c diff -u php-src/ext/gd/libgd/gd_security.c:1.1.2.2 php-src/ext/gd/libgd/gd_security.c:1.1.2.3 --- php-src/ext/gd/libgd/gd_security.c:1.1.2.2 Sat Mar 10 12:18:36 2007 +++ php-src/ext/gd/libgd/gd_security.c Tue Oct 23 01:58:08 2007 @@ -19,12 +19,10 @@ int overflow2(int a, int b) { - if(a 0 || b 0) { - php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n); + if(a = 0 || b = 0) { + php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n); return 1; } - if(b == 0) - return 0; if(a INT_MAX / b) { php_gd_error(gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n); return 1; -- 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/gd/libgd gd_security.c
mattias Tue Oct 23 01:58:30 2007 UTC Modified files: (Branch: PHP_5_3) /php-src/ext/gd/libgd gd_security.c Log: -MFB, Be paranoid and dont allow multiplication with zero http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_security.c?r1=1.1.2.2r2=1.1.2.2.2.1diff_format=u Index: php-src/ext/gd/libgd/gd_security.c diff -u php-src/ext/gd/libgd/gd_security.c:1.1.2.2 php-src/ext/gd/libgd/gd_security.c:1.1.2.2.2.1 --- php-src/ext/gd/libgd/gd_security.c:1.1.2.2 Sat Mar 10 12:18:36 2007 +++ php-src/ext/gd/libgd/gd_security.c Tue Oct 23 01:58:30 2007 @@ -19,12 +19,10 @@ int overflow2(int a, int b) { - if(a 0 || b 0) { - php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n); + if(a = 0 || b = 0) { + php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n); return 1; } - if(b == 0) - return 0; if(a INT_MAX / b) { php_gd_error(gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n); return 1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/gd/libgd gd_security.c
mattias Tue Oct 23 01:58:41 2007 UTC Modified files: /php-src/ext/gd/libgd gd_security.c Log: -MFB, Be paranoid and dont allow multiplication with zero http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gd_security.c?r1=1.1r2=1.2diff_format=u Index: php-src/ext/gd/libgd/gd_security.c diff -u php-src/ext/gd/libgd/gd_security.c:1.1 php-src/ext/gd/libgd/gd_security.c:1.2 --- php-src/ext/gd/libgd/gd_security.c:1.1 Sat Mar 10 12:16:19 2007 +++ php-src/ext/gd/libgd/gd_security.c Tue Oct 23 01:58:41 2007 @@ -19,12 +19,10 @@ int overflow2(int a, int b) { - if(a 0 || b 0) { - php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative, failing operation gracefully\n); + if(a = 0 || b = 0) { + php_gd_error(gd warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n); return 1; } - if(b == 0) - return 0; if(a INT_MAX / b) { php_gd_error(gd warning: product of memory allocation multiplication would exceed INT_MAX, failing operation gracefully\n); return 1; -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php