[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Sun May 20 01:31:05 2007 UTC Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/viewvc.cgi/php-src/ChangeLog?r1=1.2693r2=1.2694diff_format=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.2693 php-src/ChangeLog:1.2694 --- php-src/ChangeLog:1.2693Sat May 19 01:31:02 2007 +++ php-src/ChangeLog Sun May 20 01:31:03 2007 @@ -1,3 +1,93 @@ +2007-05-19 Pierre-Alain Joye [EMAIL PROTECTED] + +* ext/zip/php_zip.c: + - MFB: + - Fixed a possible crash in the event directory cannot be created, due to + a + double free. (Ilia) + - Use the same tests for zip_stat + +* (PHP_5_2) + ext/zip/php_zip.c: + - use the same checks for zip_stat + +* (PHP_5_2) + NEWS + ext/openssl/openssl.c: + - #41423. PHP assumes wrongly that certain ciphers are enabled in OpenSSL + +* ext/openssl/openssl.c: + - #41423, PHP assumes wrongly that certain ciphers are enabled in OpenSSL + +2007-05-19 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS + ext/standard/md5.c + ext/standard/md5.h + ext/standard/sha1.c: + + Optimized digest generation in md5() and sha1() functions by using code + from ext/hash. This makes the functions 20-50% faster on short strings. + +2007-05-19 Michael Wallner [EMAIL PROTECTED] + +* ext/curl/config.m4: + - fix compiler/linker agnostic runpath switch + +* (PHP_5_2) + ext/curl/config.m4: + - fix compile/linker agnostic runpath switch + +2007-05-19 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_5_2) + ext/zip/php_zip.c: + CS fixes + Fixed a possible crash in the event directory cannot be created, due to a + double free. + +* (PHP_5_2) + ext/spl/php_spl.c: + + Fixed typo in constant name + +* (PHP_5_2) + ext/spl/php_spl.c: + Eliminate memory allocation in RINIT for spl + +* (PHP_5_2) + ext/sockets/php_sockets.h + ext/sockets/sockets.c + ext/sqlite/php_sqlite.h + ext/sqlite/sqlite.c: + + Remove pointless RINIT + +* (PHP_5_2) + ext/iconv/iconv.c: + + Avoid strlen() + +* (PHP_5_2) + ext/pdo/tests/pdo_034.phpt: + Fixed test to work with postgresql + +2007-05-19 Antony Dovgal [EMAIL PROTECTED] + +* main/php_ini.c: + use correct constant + +2007-05-19 Stanislav Malyshev [EMAIL PROTECTED] + +* (PHP_5_2) + NEWS: + and now the right number + +* (PHP_5_2) + NEWS: + fix reference + 2007-05-18 Antony Dovgal [EMAIL PROTECTED] * (PHP_5_2)
[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS
stasSat May 19 08:08:03 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: fix reference http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.720r2=1.2027.2.547.2.721diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.720 php-src/NEWS:1.2027.2.547.2.721 --- php-src/NEWS:1.2027.2.547.2.720 Fri May 18 20:56:50 2007 +++ php-src/NEWSSat May 19 08:08:03 2007 @@ -13,7 +13,7 @@ - Implemented FR #41416 (getColumnMeta() should also return table name). (Tony) - Fixed possible infinite loop in imagecreatefrompng (libgd #86) (by Xavier Roche) (Pierre) -- Fixed ext/filter Email Validation Vulnerability (MOPB-24 by Stefan Esser) +- Fixed ext/filter Email Validation Vulnerability (MOPB-44 by Stefan Esser) (Ilia) - Fixed altering $this via argument named this. (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) -- 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
stasSat May 19 08:10:52 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS Log: and now the right number http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.721r2=1.2027.2.547.2.722diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.721 php-src/NEWS:1.2027.2.547.2.722 --- php-src/NEWS:1.2027.2.547.2.721 Sat May 19 08:08:03 2007 +++ php-src/NEWSSat May 19 08:10:52 2007 @@ -13,7 +13,7 @@ - Implemented FR #41416 (getColumnMeta() should also return table name). (Tony) - Fixed possible infinite loop in imagecreatefrompng (libgd #86) (by Xavier Roche) (Pierre) -- Fixed ext/filter Email Validation Vulnerability (MOPB-44 by Stefan Esser) +- Fixed ext/filter Email Validation Vulnerability (MOPB-45 by Stefan Esser) (Ilia) - Fixed altering $this via argument named this. (Dmitry) - Fixed PHP CLI to use the php.ini from the binary location. (Hannes) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /main php_ini.c
tony2001Sat May 19 12:52:31 2007 UTC Modified files: /php-src/main php_ini.c Log: use correct constant http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.153r2=1.154diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.153 php-src/main/php_ini.c:1.154 --- php-src/main/php_ini.c:1.153Mon May 14 12:19:25 2007 +++ php-src/main/php_ini.c Sat May 19 12:52:31 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.153 2007/05/14 12:19:25 tony2001 Exp $ */ +/* $Id: php_ini.c,v 1.154 2007/05/19 12:52:31 tony2001 Exp $ */ #include php.h #include ext/standard/info.h @@ -350,7 +350,7 @@ } #else if (sapi_module.executable_location) { - binary_location = (char *)emalloc(PATH_MAX); + binary_location = (char *)emalloc(MAXPATHLEN); if (!strchr(sapi_module.executable_location, '/')) { char *envpath, *path; int found = 0; -- 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) /main php_ini.c
tony2001Sat May 19 12:53:06 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/main php_ini.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.12r2=1.136.2.4.2.13diff_format=u Index: php-src/main/php_ini.c diff -u php-src/main/php_ini.c:1.136.2.4.2.12 php-src/main/php_ini.c:1.136.2.4.2.13 --- php-src/main/php_ini.c:1.136.2.4.2.12 Mon May 14 12:19:34 2007 +++ php-src/main/php_ini.c Sat May 19 12:53:06 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_ini.c,v 1.136.2.4.2.12 2007/05/14 12:19:34 tony2001 Exp $ */ +/* $Id: php_ini.c,v 1.136.2.4.2.13 2007/05/19 12:53:06 tony2001 Exp $ */ #include php.h #include ext/standard/info.h @@ -352,7 +352,7 @@ } #else if (sapi_module.executable_location) { - binary_location = (char *)emalloc(PATH_MAX); + binary_location = (char *)emalloc(MAXPATHLEN); if (!strchr(sapi_module.executable_location, '/')) { char *envpath, *path; int found = 0; -- 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/pdo/tests pdo_034.phpt
iliaa Sat May 19 15:28:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/pdo/tests pdo_034.phpt Log: Fixed test to work with postgresql http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/pdo_034.phpt?r1=1.1.2.3r2=1.1.2.4diff_format=u Index: php-src/ext/pdo/tests/pdo_034.phpt diff -u php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.3 php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.4 --- php-src/ext/pdo/tests/pdo_034.phpt:1.1.2.3 Thu May 17 13:40:12 2007 +++ php-src/ext/pdo/tests/pdo_034.phpt Sat May 19 15:28:37 2007 @@ -14,7 +14,7 @@ require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; $db = PDOTest::factory(); -$db-exec(CREATE TABLE test (a char(100), b char(100), c char(100))); +$db-exec(CREATE TABLE test (a varchar(100), b varchar(100), c varchar(100))); for ($i = 0; $i 5; $i++) { $db-exec(INSERT INTO test (a,b,c) VALUES('test.$i.','.$i.','.$i.')); -- 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/iconv iconv.c
iliaa Sat May 19 17:52:30 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/iconv iconv.c Log: Avoid strlen() http://cvs.php.net/viewvc.cgi/php-src/ext/iconv/iconv.c?r1=1.124.2.8.2.15r2=1.124.2.8.2.16diff_format=u Index: php-src/ext/iconv/iconv.c diff -u php-src/ext/iconv/iconv.c:1.124.2.8.2.15 php-src/ext/iconv/iconv.c:1.124.2.8.2.16 --- php-src/ext/iconv/iconv.c:1.124.2.8.2.15Mon Mar 12 19:34:26 2007 +++ php-src/ext/iconv/iconv.c Sat May 19 17:52:30 2007 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: iconv.c,v 1.124.2.8.2.15 2007/03/12 19:34:26 tony2001 Exp $ */ +/* $Id: iconv.c,v 1.124.2.8.2.16 2007/05/19 17:52:30 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -2305,8 +2305,8 @@ ICONVG(output_encoding), ICONVG(internal_encoding)); _php_iconv_show_error(err, ICONVG(output_encoding), ICONVG(internal_encoding) TSRMLS_CC); if (out_buffer != NULL) { - spprintf(content_type, 0, Content-Type:%s; charset=%s, mimetype, ICONVG(output_encoding)); - if (content_type sapi_add_header(content_type, strlen(content_type), 0) != FAILURE) { + int len = spprintf(content_type, 0, Content-Type:%s; charset=%s, mimetype, ICONVG(output_encoding)); + if (content_type sapi_add_header(content_type, len, 0) != FAILURE) { SG(sapi_headers).send_default_content_type = 0; } if (mimetype_alloced) { -- 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/sockets php_sockets.h sockets.c /ext/sqlite php_sqlite.h sqlite.c
iliaa Sat May 19 17:58:22 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/sqlite sqlite.c php_sqlite.h /php-src/ext/socketssockets.c php_sockets.h Log: Remove pointless RINIT http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/sqlite.c?r1=1.166.2.13.2.8r2=1.166.2.13.2.9diff_format=u Index: php-src/ext/sqlite/sqlite.c diff -u php-src/ext/sqlite/sqlite.c:1.166.2.13.2.8 php-src/ext/sqlite/sqlite.c:1.166.2.13.2.9 --- php-src/ext/sqlite/sqlite.c:1.166.2.13.2.8 Sat May 5 15:36:15 2007 +++ php-src/ext/sqlite/sqlite.c Sat May 19 17:58:22 2007 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: sqlite.c,v 1.166.2.13.2.8 2007/05/05 15:36:15 iliaa Exp $ + $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $ */ #ifdef HAVE_CONFIG_H @@ -295,7 +295,7 @@ sqlite_functions, PHP_MINIT(sqlite), PHP_MSHUTDOWN(sqlite), - PHP_RINIT(sqlite), + NULL, PHP_RSHUTDOWN(sqlite), PHP_MINFO(sqlite), #if ZEND_MODULE_API_NO = 20010901 @@ -1124,16 +1124,11 @@ return SUCCESS; } -PHP_RINIT_FUNCTION(sqlite) -{ - return SUCCESS; -} - PHP_MINFO_FUNCTION(sqlite) { php_info_print_table_start(); php_info_print_table_header(2, SQLite support, enabled); - php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION $Id: sqlite.c,v 1.166.2.13.2.8 2007/05/05 15:36:15 iliaa Exp $); + php_info_print_table_row(2, PECL Module version, PHP_SQLITE_MODULE_VERSION $Id: sqlite.c,v 1.166.2.13.2.9 2007/05/19 17:58:22 iliaa Exp $); php_info_print_table_row(2, SQLite Library, sqlite_libversion()); php_info_print_table_row(2, SQLite Encoding, sqlite_libencoding()); php_info_print_table_end(); http://cvs.php.net/viewvc.cgi/php-src/ext/sqlite/php_sqlite.h?r1=1.32.2.2.2.1r2=1.32.2.2.2.2diff_format=u Index: php-src/ext/sqlite/php_sqlite.h diff -u php-src/ext/sqlite/php_sqlite.h:1.32.2.2.2.1 php-src/ext/sqlite/php_sqlite.h:1.32.2.2.2.2 --- php-src/ext/sqlite/php_sqlite.h:1.32.2.2.2.1Mon Jan 1 09:36:07 2007 +++ php-src/ext/sqlite/php_sqlite.h Sat May 19 17:58:22 2007 @@ -17,7 +17,7 @@ | Marcus Boerger [EMAIL PROTECTED] | +--+ - $Id: php_sqlite.h,v 1.32.2.2.2.1 2007/01/01 09:36:07 sebastian Exp $ + $Id: php_sqlite.h,v 1.32.2.2.2.2 2007/05/19 17:58:22 iliaa Exp $ */ #ifndef PHP_SQLITE_H @@ -38,7 +38,6 @@ PHP_MINIT_FUNCTION(sqlite); PHP_MSHUTDOWN_FUNCTION(sqlite); -PHP_RINIT_FUNCTION(sqlite); PHP_RSHUTDOWN_FUNCTION(sqlite); PHP_MINFO_FUNCTION(sqlite); http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.171.2.9.2.8r2=1.171.2.9.2.9diff_format=u Index: php-src/ext/sockets/sockets.c diff -u php-src/ext/sockets/sockets.c:1.171.2.9.2.8 php-src/ext/sockets/sockets.c:1.171.2.9.2.9 --- php-src/ext/sockets/sockets.c:1.171.2.9.2.8 Sun Feb 25 22:59:32 2007 +++ php-src/ext/sockets/sockets.c Sat May 19 17:58:22 2007 @@ -19,7 +19,7 @@ +--+ */ -/* $Id: sockets.c,v 1.171.2.9.2.8 2007/02/25 22:59:32 tony2001 Exp $ */ +/* $Id: sockets.c,v 1.171.2.9.2.9 2007/05/19 17:58:22 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -158,7 +158,7 @@ sockets_functions, PHP_MINIT(sockets), NULL, - PHP_RINIT(sockets), + NULL, PHP_RSHUTDOWN(sockets), PHP_MINFO(sockets), NO_VERSION_YET, @@ -515,13 +515,6 @@ } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION */ -PHP_RINIT_FUNCTION(sockets) -{ - return SUCCESS; -} -/* }}} */ - /* {{{ PHP_RSHUTDOWN_FUNCTION */ PHP_RSHUTDOWN_FUNCTION(sockets) { http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets.h?r1=1.36.2.1.2.2r2=1.36.2.1.2.3diff_format=u Index: php-src/ext/sockets/php_sockets.h diff -u php-src/ext/sockets/php_sockets.h:1.36.2.1.2.2 php-src/ext/sockets/php_sockets.h:1.36.2.1.2.3 --- php-src/ext/sockets/php_sockets.h:1.36.2.1.2.2 Wed Jan 10 15:25:07 2007 +++ php-src/ext/sockets/php_sockets.h Sat May 19 17:58:22 2007 @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h,v 1.36.2.1.2.2 2007/01/10 15:25:07 bjori Exp $ */ +/* $Id: php_sockets.h,v 1.36.2.1.2.3 2007/05/19 17:58:22 iliaa Exp $ */ #if HAVE_SOCKETS @@ -41,7 +41,6 @@ PHP_MINIT_FUNCTION(sockets); PHP_MINFO_FUNCTION(sockets); -PHP_RINIT_FUNCTION(sockets); PHP_RSHUTDOWN_FUNCTION(sockets); PHP_FUNCTION(socket_select); -- 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/spl php_spl.c
iliaa Sat May 19 18:32:35 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/splphp_spl.c Log: Eliminate memory allocation in RINIT for spl http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.15r2=1.52.2.28.2.16diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.15 php-src/ext/spl/php_spl.c:1.52.2.28.2.16 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.15Fri Apr 6 16:00:08 2007 +++ php-src/ext/spl/php_spl.c Sat May 19 18:32:35 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.15 2007/04/06 16:00:08 helly Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.16 2007/05/19 18:32:35 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -45,6 +45,8 @@ ZEND_DECLARE_MODULE_GLOBALS(spl) +#define SPL_DEFAULT_FILE_EXTRNSIONS .inc,.php + /* {{{ spl_functions_none */ zend_function_entry spl_functions_none[] = { @@ -271,7 +273,11 @@ RETURN_FALSE; } - copy = pos1 = estrndup(file_exts, file_exts_len); + if (file_exts == NULL) { /* autoload_extensions is not intialzed, set to defaults */ + copy = pos1 = estrndup(SPL_DEFAULT_FILE_EXTRNSIONS, sizeof(SPL_DEFAULT_FILE_EXTRNSIONS)-1); + } else { + copy = pos1 = estrndup(file_exts, file_exts_len); + } lc_name = zend_str_tolower_dup(class_name, class_name_len); while(pos1 *pos1 !EG(exception)) { EG(return_value_ptr_ptr) = original_return_value; @@ -328,7 +334,11 @@ SPL_G(autoload_extensions_len) = file_exts_len; } - RETURN_STRINGL(SPL_G(autoload_extensions), SPL_G(autoload_extensions_len), 1); + if (SPL_G(autoload_extensions) == NULL) { + RETURN_STRINGL(SPL_DEFAULT_FILE_EXTRNSIONS, sizeof(SPL_DEFAULT_FILE_EXTRNSIONS) - 1, 1); + } else { + RETURN_STRINGL(SPL_G(autoload_extensions), SPL_G(autoload_extensions_len), 1); + } } /* }}} */ typedef struct { @@ -717,8 +727,8 @@ PHP_RINIT_FUNCTION(spl) /* {{{ */ { - SPL_G(autoload_extensions) = estrndup(.inc,.php, sizeof(.inc,.php)-1); - SPL_G(autoload_extensions_len) = sizeof(.inc,.php)-1; + SPL_G(autoload_extensions) = NULL; + SPL_G(autoload_extensions_len) = 0; SPL_G(autoload_functions) = NULL; return SUCCESS; } /* }}} */ -- 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/spl php_spl.c
iliaa Sat May 19 18:40:27 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/splphp_spl.c Log: Fixed typo in constant name http://cvs.php.net/viewvc.cgi/php-src/ext/spl/php_spl.c?r1=1.52.2.28.2.16r2=1.52.2.28.2.17diff_format=u Index: php-src/ext/spl/php_spl.c diff -u php-src/ext/spl/php_spl.c:1.52.2.28.2.16 php-src/ext/spl/php_spl.c:1.52.2.28.2.17 --- php-src/ext/spl/php_spl.c:1.52.2.28.2.16Sat May 19 18:32:35 2007 +++ php-src/ext/spl/php_spl.c Sat May 19 18:40:27 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_spl.c,v 1.52.2.28.2.16 2007/05/19 18:32:35 iliaa Exp $ */ +/* $Id: php_spl.c,v 1.52.2.28.2.17 2007/05/19 18:40:27 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -45,7 +45,7 @@ ZEND_DECLARE_MODULE_GLOBALS(spl) -#define SPL_DEFAULT_FILE_EXTRNSIONS .inc,.php +#define SPL_DEFAULT_FILE_EXTENSIONS .inc,.php /* {{{ spl_functions_none */ @@ -274,7 +274,7 @@ } if (file_exts == NULL) { /* autoload_extensions is not intialzed, set to defaults */ - copy = pos1 = estrndup(SPL_DEFAULT_FILE_EXTRNSIONS, sizeof(SPL_DEFAULT_FILE_EXTRNSIONS)-1); + copy = pos1 = estrndup(SPL_DEFAULT_FILE_EXTENSIONS, sizeof(SPL_DEFAULT_FILE_EXTENSIONS)-1); } else { copy = pos1 = estrndup(file_exts, file_exts_len); } @@ -335,7 +335,7 @@ } if (SPL_G(autoload_extensions) == NULL) { - RETURN_STRINGL(SPL_DEFAULT_FILE_EXTRNSIONS, sizeof(SPL_DEFAULT_FILE_EXTRNSIONS) - 1, 1); + RETURN_STRINGL(SPL_DEFAULT_FILE_EXTENSIONS, sizeof(SPL_DEFAULT_FILE_EXTENSIONS) - 1, 1); } else { RETURN_STRINGL(SPL_G(autoload_extensions), SPL_G(autoload_extensions_len), 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) /ext/zip php_zip.c
iliaa Sat May 19 19:29:37 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: CS fixes Fixed a possible crash in the event directory cannot be created, due to a double free. http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.31r2=1.1.2.32diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.31 php-src/ext/zip/php_zip.c:1.1.2.32 --- php-src/ext/zip/php_zip.c:1.1.2.31 Wed Mar 14 15:02:20 2007 +++ php-src/ext/zip/php_zip.c Sat May 19 19:29:37 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.31 2007/03/14 15:02:20 iliaa Exp $ */ +/* $Id: php_zip.c,v 1.1.2.32 2007/05/19 19:29:37 iliaa Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -1699,7 +1699,6 @@ zval **zval_file = NULL; php_stream_statbuf ssb; char *pathto; - char *file; int pathto_len; int ret, i; @@ -1713,24 +1712,22 @@ return; } - if (pathto_len1) { + if (pathto_len 1) { RETURN_FALSE; } -if (php_stream_stat_path(pathto, ssb) 0) { -ret = php_stream_mkdir(pathto, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL); -if (!ret) { -efree(pathto); -RETURN_FALSE; -} -} + if (php_stream_stat_path(pathto, ssb) 0) { + ret = php_stream_mkdir(pathto, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL); + if (!ret) { + RETURN_FALSE; + } + } ZIP_FROM_OBJECT(intern, this); if (zval_files) { switch (Z_TYPE_P(zval_files)) { case IS_STRING: - file = Z_STRVAL_P(zval_files); - if (!php_zip_extract_file(intern, pathto, file, Z_STRLEN_P(zval_files) TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files) TSRMLS_CC)) { RETURN_FALSE; } break; @@ -1745,8 +1742,7 @@ case IS_LONG: break; case IS_STRING: - file = Z_STRVAL_PP(zval_file); - if (!php_zip_extract_file(intern, pathto, file, Z_STRLEN_PP(zval_file) TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, Z_STRVAL_PP(zval_file), Z_STRLEN_PP(zval_file) TSRMLS_CC)) { RETURN_FALSE; } break; @@ -1760,22 +1756,21 @@ break; } } else { -/* Extract all files */ -int filecount = zip_get_num_files(intern); + /* Extract all files */ + int filecount = zip_get_num_files(intern); -if (filecount == -1) { -php_error_docref(NULL TSRMLS_CC, E_WARNING, Illegal archive); -RETURN_FALSE; -} - -for (i = 0; i filecount; i++) { -file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); -if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { -RETURN_FALSE; -} -} -} + if (filecount == -1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, Illegal archive); + RETURN_FALSE; + } + for (i = 0; i filecount; i++) { + char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); + if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { + RETURN_FALSE; + } + } + } RETURN_TRUE; } /* }}} */ @@ -2027,7 +2022,7 @@ php_info_print_table_start(); php_info_print_table_row(2, Zip, enabled); - php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.1.2.31 2007/03/14 15:02:20 iliaa Exp $); + php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.1.2.32 2007/05/19 19:29:37 iliaa Exp $); php_info_print_table_row(2, Zip version, 2.0.0); php_info_print_table_row(2, Libzip version, 0.7.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) /ext/curl config.m4
mikeSat May 19 19:36:11 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/curl config.m4 Log: - fix compile/linker agnostic runpath switch http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.28.2.3.2.4r2=1.28.2.3.2.5diff_format=u Index: php-src/ext/curl/config.m4 diff -u php-src/ext/curl/config.m4:1.28.2.3.2.4 php-src/ext/curl/config.m4:1.28.2.3.2.5 --- php-src/ext/curl/config.m4:1.28.2.3.2.4 Wed May 16 21:18:41 2007 +++ php-src/ext/curl/config.m4 Sat May 19 19:36:11 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.28.2.3.2.4 2007/05/16 21:18:41 mike Exp $ +dnl $Id: config.m4,v 1.28.2.3.2.5 2007/05/19 19:36:11 mike Exp $ dnl PHP_ARG_WITH(curl, for cURL support, @@ -58,7 +58,7 @@ save_CFLAGS=$CFLAGS CFLAGS=`$CURL_CONFIG --cflags` save_LDFLAGS=$LDFALGS - LDFLAGS=`$CURL_CONFIG --libs` -Wl,--rpath -Wl,$CURL_DIR/$PHP_LIBDIR + LDFLAGS=`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR AC_CHECK_HEADER([openssl/crypto.h], [ AC_MSG_CHECKING([for openssl support in libcurl]) -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/curl config.m4
mikeSat May 19 19:36:35 2007 UTC Modified files: /php-src/ext/curl config.m4 Log: - fix compiler/linker agnostic runpath switch http://cvs.php.net/viewvc.cgi/php-src/ext/curl/config.m4?r1=1.36r2=1.37diff_format=u Index: php-src/ext/curl/config.m4 diff -u php-src/ext/curl/config.m4:1.36 php-src/ext/curl/config.m4:1.37 --- php-src/ext/curl/config.m4:1.36 Wed May 16 21:19:53 2007 +++ php-src/ext/curl/config.m4 Sat May 19 19:36:35 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4,v 1.36 2007/05/16 21:19:53 mike Exp $ +dnl $Id: config.m4,v 1.37 2007/05/19 19:36:35 mike Exp $ dnl PHP_ARG_WITH(curl, for cURL support, @@ -58,7 +58,7 @@ save_CFLAGS=$CFLAGS CFLAGS=`$CURL_CONFIG --cflags` save_LDFLAGS=$LDFALGS - LDFLAGS=`$CURL_CONFIG --libs` -Wl,--rpath -Wl,$CURL_DIR/$PHP_LIBDIR + LDFLAGS=`$CURL_CONFIG --libs` $ld_runpath_switch$CURL_DIR/$PHP_LIBDIR AC_CHECK_HEADER([openssl/crypto.h], [ AC_MSG_CHECKING([for openssl support in libcurl]) -- 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/standard md5.c md5.h sha1.c
iliaa Sat May 19 20:30:35 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/standard md5.c md5.h sha1.c Log: Optimized digest generation in md5() and sha1() functions by using code from ext/hash. This makes the functions 20-50% faster on short strings. http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.722r2=1.2027.2.547.2.723diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.722 php-src/NEWS:1.2027.2.547.2.723 --- php-src/NEWS:1.2027.2.547.2.722 Sat May 19 08:10:52 2007 +++ php-src/NEWSSat May 19 20:30:35 2007 @@ -3,6 +3,7 @@ ?? ??? 2007, PHP 5.2.3 - Improved compilation of heredocs and interpolated strings. (Matt, Dmitry) - Optimized out a couple of per-request syscalls (Rasmus) +- Optimized digest generation in md5() and sha1() functions. (Ilia) - Upgraded SQLite 3 to version 3.3.16 (Ilia) - Added PDO::FETCH_KEY_PAIR mode that will fetch a 2 column result set into an associated array. (Ilia) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/md5.c?r1=1.39.2.1.2.1r2=1.39.2.1.2.2diff_format=u Index: php-src/ext/standard/md5.c diff -u php-src/ext/standard/md5.c:1.39.2.1.2.1 php-src/ext/standard/md5.c:1.39.2.1.2.2 --- php-src/ext/standard/md5.c:1.39.2.1.2.1 Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/md5.c Sat May 19 20:30:35 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: md5.c,v 1.39.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: md5.c,v 1.39.2.1.2.2 2007/05/19 20:30:35 iliaa Exp $ */ /* * md5.c - Copyright 1997 Lachlan Roche @@ -28,14 +28,19 @@ PHPAPI void make_digest(char *md5str, unsigned char *digest) { + return make_digest_ex(md5str, digest, strlen(digest)); +} + +PHPAPI void make_digest_ex(char *md5str, unsigned char *digest, int len) +{ + static const char hexits[17] = 0123456789abcdef; int i; - for (i = 0; i 16; i++) { - sprintf(md5str, %02x, digest[i]); - md5str += 2; + for (i = 0; i len; i++) { + md5str[i * 2] = hexits[digest[i] 4]; + md5str[(i * 2) + 1] = hexits[digest[i] 0x0F]; } - - *md5str = '\0'; + md5str[len * 2] = '\0'; } /* {{{ proto string md5(string str, [ bool raw_output]) @@ -60,7 +65,7 @@ if (raw_output) { RETURN_STRINGL(digest, 16, 1); } else { - make_digest(md5str, digest); + make_digest_ex(md5str, digest, 16); RETVAL_STRING(md5str, 1); } @@ -107,7 +112,7 @@ if (raw_output) { RETURN_STRINGL(digest, 16, 1); } else { - make_digest(md5str, digest); + make_digest_ex(md5str, digest, 16); RETVAL_STRING(md5str, 1); } } http://cvs.php.net/viewvc.cgi/php-src/ext/standard/md5.h?r1=1.17.2.1.2.1r2=1.17.2.1.2.2diff_format=u Index: php-src/ext/standard/md5.h diff -u php-src/ext/standard/md5.h:1.17.2.1.2.1 php-src/ext/standard/md5.h:1.17.2.1.2.2 --- php-src/ext/standard/md5.h:1.17.2.1.2.1 Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/md5.h Sat May 19 20:30:35 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: md5.h,v 1.17.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: md5.h,v 1.17.2.1.2.2 2007/05/19 20:30:35 iliaa Exp $ */ #ifndef MD5_H #define MD5_H @@ -55,6 +55,7 @@ } PHP_MD5_CTX; PHPAPI void make_digest(char *md5str, unsigned char *digest); +PHPAPI void make_digest_ex(char *md5str, unsigned char *digest, int len); PHPAPI void PHP_MD5Init(PHP_MD5_CTX *); PHPAPI void PHP_MD5Update(PHP_MD5_CTX *, const unsigned char *, unsigned int); PHPAPI void PHP_MD5Final(unsigned char[16], PHP_MD5_CTX *); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/sha1.c?r1=1.13.2.1.2.1r2=1.13.2.1.2.2diff_format=u Index: php-src/ext/standard/sha1.c diff -u php-src/ext/standard/sha1.c:1.13.2.1.2.1 php-src/ext/standard/sha1.c:1.13.2.1.2.2 --- php-src/ext/standard/sha1.c:1.13.2.1.2.1Mon Jan 1 09:36:08 2007 +++ php-src/ext/standard/sha1.c Sat May 19 20:30:35 2007 @@ -16,24 +16,18 @@ +--+ */ -/* $Id: sha1.c,v 1.13.2.1.2.1 2007/01/01 09:36:08 sebastian Exp $ */ +/* $Id: sha1.c,v 1.13.2.1.2.2 2007/05/19 20:30:35 iliaa Exp $ */ #include php.h /* This code is heavily based on the PHP md5 implementation */ #include sha1.h +#include md5.h PHPAPI void make_sha1_digest(char *sha1str, unsigned char *digest) { - int i; - - for (i = 0; i 20; i++) { - sprintf(sha1str, %02x, digest[i]); - sha1str += 2; - } - - *sha1str = '\0'; + return make_digest_ex(sha1str, digest, 20); } /* {{{ proto string sha1(string str [, bool raw_output]) @@ -58,7 +52,7 @@ if (raw_output) {
[PHP-CVS] cvs: php-src /ext/openssl openssl.c
pajoye Sat May 19 22:04:28 2007 UTC Modified files: /php-src/ext/opensslopenssl.c Log: - #41423, PHP assumes wrongly that certain ciphers are enabled in OpenSSL http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.137r2=1.138diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.137 php-src/ext/openssl/openssl.c:1.138 --- php-src/ext/openssl/openssl.c:1.137 Thu Apr 5 18:09:48 2007 +++ php-src/ext/openssl/openssl.c Sat May 19 22:04:27 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.137 2007/04/05 18:09:48 rrichards Exp $ */ +/* $Id: openssl.c,v 1.138 2007/05/19 22:04:27 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -693,11 +693,15 @@ REGISTER_LONG_CONSTANT(OPENSSL_PKCS1_OAEP_PADDING, RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); /* Ciphers */ +#ifndef OPENSSL_NO_RC2 REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_40, PHP_OPENSSL_CIPHER_RC2_40, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_128, PHP_OPENSSL_CIPHER_RC2_128, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_64, PHP_OPENSSL_CIPHER_RC2_64, CONST_CS|CONST_PERSISTENT); +#endif +#ifndef OPENSSL_NO_DES REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES, PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES, PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT); +#endif /* Values for key types */ REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA, OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT); @@ -2930,6 +2934,7 @@ /* sanity check the cipher */ switch (cipherid) { +#ifndef OPENSSL_NO_RC2 case PHP_OPENSSL_CIPHER_RC2_40: cipher = EVP_rc2_40_cbc(); break; @@ -2939,12 +2944,17 @@ case PHP_OPENSSL_CIPHER_RC2_128: cipher = EVP_rc2_cbc(); break; +#endif + +#ifndef OPENSSL_NO_DES case PHP_OPENSSL_CIPHER_DES: cipher = EVP_des_cbc(); break; case PHP_OPENSSL_CIPHER_3DES: cipher = EVP_des_ede3_cbc(); break; +#endif + default: php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid cipher type `%ld', cipherid); goto clean_exit; -- 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/openssl openssl.c
pajoye Sat May 19 22:05:08 2007 UTC Modified files: (Branch: PHP_5_2) /php-srcNEWS /php-src/ext/opensslopenssl.c Log: - #41423. PHP assumes wrongly that certain ciphers are enabled in OpenSSL http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.723r2=1.2027.2.547.2.724diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.723 php-src/NEWS:1.2027.2.547.2.724 --- php-src/NEWS:1.2027.2.547.2.723 Sat May 19 20:30:35 2007 +++ php-src/NEWSSat May 19 22:05:08 2007 @@ -21,6 +21,8 @@ - Fixed segfault in strripos(). (Tony, Joxean Koret) - Fixed bug #41430 (Fatal error with negative values of maxlen parameter of file_get_contents()). (Tony) +- fixed bug #41423 (PHP assumes wrongly that certain ciphers are enabled in + OpenSSL) (Pierre) - Fixed bug #41421 (Uncaught exception from a stream wrapper segfaults). (Tony, Dmitry) - Fixed bug #41403 (json_decode cannot decode floats if localeconv http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.33r2=1.98.2.5.2.34diff_format=u Index: php-src/ext/openssl/openssl.c diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.33 php-src/ext/openssl/openssl.c:1.98.2.5.2.34 --- php-src/ext/openssl/openssl.c:1.98.2.5.2.33 Sun May 13 17:37:32 2007 +++ php-src/ext/openssl/openssl.c Sat May 19 22:05:08 2007 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: openssl.c,v 1.98.2.5.2.33 2007/05/13 17:37:32 iliaa Exp $ */ +/* $Id: openssl.c,v 1.98.2.5.2.34 2007/05/19 22:05:08 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -707,11 +707,15 @@ REGISTER_LONG_CONSTANT(OPENSSL_PKCS1_OAEP_PADDING, RSA_PKCS1_OAEP_PADDING, CONST_CS|CONST_PERSISTENT); /* Ciphers */ +#ifndef OPENSSL_NO_RC2 REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_40, PHP_OPENSSL_CIPHER_RC2_40, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_128, PHP_OPENSSL_CIPHER_RC2_128, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_RC2_64, PHP_OPENSSL_CIPHER_RC2_64, CONST_CS|CONST_PERSISTENT); +#endif +#ifndef OPENSSL_NO_DES REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_DES, PHP_OPENSSL_CIPHER_DES, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT(OPENSSL_CIPHER_3DES, PHP_OPENSSL_CIPHER_3DES, CONST_CS|CONST_PERSISTENT); +#endif /* Values for key types */ REGISTER_LONG_CONSTANT(OPENSSL_KEYTYPE_RSA, OPENSSL_KEYTYPE_RSA, CONST_CS|CONST_PERSISTENT); @@ -2928,6 +2932,7 @@ /* sanity check the cipher */ switch (cipherid) { +#ifndef OPENSSL_NO_RC2 case PHP_OPENSSL_CIPHER_RC2_40: cipher = EVP_rc2_40_cbc(); break; @@ -2937,12 +2942,17 @@ case PHP_OPENSSL_CIPHER_RC2_128: cipher = EVP_rc2_cbc(); break; +#endif + +#ifndef OPENSSL_NO_DES case PHP_OPENSSL_CIPHER_DES: cipher = EVP_des_cbc(); break; case PHP_OPENSSL_CIPHER_3DES: cipher = EVP_des_ede3_cbc(); break; +#endif + default: php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid cipher type `%ld', cipherid); goto clean_exit; -- 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/zip php_zip.c
pajoye Sat May 19 22:25:11 2007 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/zipphp_zip.c Log: - use the same checks for zip_stat http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.1.2.32r2=1.1.2.33diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.1.2.32 php-src/ext/zip/php_zip.c:1.1.2.33 --- php-src/ext/zip/php_zip.c:1.1.2.32 Sat May 19 19:29:37 2007 +++ php-src/ext/zip/php_zip.c Sat May 19 22:25:11 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.1.2.32 2007/05/19 19:29:37 iliaa Exp $ */ +/* $Id: php_zip.c,v 1.1.2.33 2007/05/19 22:25:11 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,7 +62,7 @@ php_error_docref(NULL TSRMLS_CC, E_NOTICE, Empty string as entry name); \ RETURN_FALSE; \ } \ - if (zip_stat(za, path, flags, sb)) { \ + if (zip_stat(za, path, flags, sb) != 0) { \ RETURN_FALSE; \ } /* }}} */ @@ -103,7 +103,7 @@ size_t file_basename_len; int is_dir_only = 0; - if (file_len = MAXPATHLEN || zip_stat(za, file, 0, sb)) { + if (file_len = MAXPATHLEN || zip_stat(za, file, 0, sb) != 0) { return 0; } @@ -1879,7 +1879,7 @@ return; } - if (zip_stat(intern, filename, 0, sb)) { + if (zip_stat(intern, filename, 0, sb) != 0) { RETURN_FALSE; } @@ -2022,7 +2022,7 @@ php_info_print_table_start(); php_info_print_table_row(2, Zip, enabled); - php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.1.2.32 2007/05/19 19:29:37 iliaa Exp $); + php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.1.2.33 2007/05/19 22:25:11 pajoye Exp $); php_info_print_table_row(2, Zip version, 2.0.0); php_info_print_table_row(2, Libzip version, 0.7.1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/zip php_zip.c
pajoye Sat May 19 22:26:32 2007 UTC Modified files: /php-src/ext/zipphp_zip.c Log: - MFB: - Fixed a possible crash in the event directory cannot be created, due to a double free. (Ilia) - Use the same tests for zip_stat http://cvs.php.net/viewvc.cgi/php-src/ext/zip/php_zip.c?r1=1.43r2=1.44diff_format=u Index: php-src/ext/zip/php_zip.c diff -u php-src/ext/zip/php_zip.c:1.43 php-src/ext/zip/php_zip.c:1.44 --- php-src/ext/zip/php_zip.c:1.43 Wed Mar 14 16:34:56 2007 +++ php-src/ext/zip/php_zip.c Sat May 19 22:26:32 2007 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_zip.c,v 1.43 2007/03/14 16:34:56 pajoye Exp $ */ +/* $Id: php_zip.c,v 1.44 2007/05/19 22:26:32 pajoye Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -62,7 +62,7 @@ php_error_docref(NULL TSRMLS_CC, E_NOTICE, Empty string as entry name); \ RETURN_FALSE; \ } \ - if (zip_stat(za, path, flags, sb)) { \ + if (zip_stat(za, path, flags, sb) == -1) { \ RETURN_FALSE; \ } /* }}} */ @@ -103,7 +103,7 @@ size_t file_basename_len; int is_dir_only = 0; - if (file_len = MAXPATHLEN || zip_stat(za, file, 0, sb)) { + if (file_len = MAXPATHLEN || zip_stat(za, file, 0, sb) != 0) { return 0; } @@ -1200,6 +1200,8 @@ long flags = 0; struct zip_stat sb; + int res = 0; + if (!this) { RETURN_FALSE; } @@ -1210,6 +1212,10 @@ name, name_len, UG(ascii_conv), flags) == FAILURE) { return; } + res =zip_stat(intern, name, flags, sb); + if (res == -1) { + RETURN_FALSE; + } PHP_ZIP_STAT_PATH(intern, name, name_len, flags, sb); @@ -1770,14 +1776,13 @@ RETURN_FALSE; } - if (pathto_len1) { + if (pathto_len 1) { RETURN_FALSE; } if (php_stream_stat_path(pathto, ssb) 0) { ret = php_stream_mkdir(pathto, 0777, PHP_STREAM_MKDIR_RECURSIVE, NULL); if (!ret) { -efree(pathto); RETURN_FALSE; } } @@ -1800,7 +1805,7 @@ RETURN_FALSE; } - if (!php_zip_extract_file(intern, pathto, file, file_len TSRMLS_CC)) { + if (!php_zip_extract_file(intern, pathto, Z_STRVAL_P(zval_files), Z_STRLEN_P(zval_files) TSRMLS_CC)) { efree(file); RETURN_FALSE; } @@ -1831,7 +1836,6 @@ } if (!php_zip_extract_file(intern, pathto, file, file_len TSRMLS_CC)) { - efree(file); RETURN_FALSE; } break; @@ -1854,7 +1858,7 @@ } for (i = 0; i filecount; i++) { -file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); +char *file = (char*)zip_get_name(intern, i, ZIP_FL_UNCHANGED); if (!php_zip_extract_file(intern, pathto, file, strlen(file) TSRMLS_CC)) { RETURN_FALSE; } @@ -1969,7 +1973,7 @@ return; } - if (zip_stat(intern, filename, 0, sb)) { + if (zip_stat(intern, filename, 0, sb) != 0) { RETURN_FALSE; } @@ -2112,7 +2116,7 @@ php_info_print_table_start(); php_info_print_table_row(2, Zip, enabled); - php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.43 2007/03/14 16:34:56 pajoye Exp $); + php_info_print_table_row(2, Extension Version,$Id: php_zip.c,v 1.44 2007/05/19 22:26:32 pajoye Exp $); php_info_print_table_row(2, Zip version, 2.0.0); php_info_print_table_row(2, Libzip version, 0.7.1); -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php