[PHP-CVS-DAILY] cvs: php-src / ChangeLog
changelog Wed Jul 21 20:34:30 2004 EDT Modified files: /php-srcChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/php-src/ChangeLog?r1=1.1692r2=1.1693ty=u Index: php-src/ChangeLog diff -u php-src/ChangeLog:1.1692 php-src/ChangeLog:1.1693 --- php-src/ChangeLog:1.1692Tue Jul 20 20:34:22 2004 +++ php-src/ChangeLog Wed Jul 21 20:34:29 2004 @@ -1,3 +1,100 @@ +2004-07-21 Edin Kadribasic [EMAIL PROTECTED] + +* configure.in + main/php_version.h: + HEAD is 5.1.0-dev now + +* sapi/isapi/php5isapi.c: + Fix for #28929 by Michael Sisolak + +* ZendEngine2/zend_builtin_functions.c: + Fixed build + +2004-07-21 Ilia Alshanetsky [EMAIL PROTECTED] + +* (PHP_4_3) + NEWS + ext/imap/php_imap.c + ext/imap/php_imap.c: + MFH: Fixed bug #29209 (imap_fetchbody() doesn't check message index). + +* ext/imap/php_imap.c: + Fixed bug #29209 (imap_fetchbody() doesn't check message index). + + +2004-07-21 Andrey Hristov [EMAIL PROTECTED] + +* NEWS + ext/standard/array.c + ext/standard/basic_functions.c + ext/standard/php_array.h + ext/standard/tests/array/array_diff_key.phpt + ext/standard/tests/array/array_intersect_key.phpt: + add array_: + intersect_key() + intersect_ukey() + diff_key() + diff_ukey() + The first two by a patch of Cristiano Duarte. The second two were + implemented in almost the same way except one small difference. + +2004-07-21 Marcus Boerger [EMAIL PROTECTED] + +* (PHP_5_0) + NEWS: + BFN + +* (PHP_5_0) + ZendEngine2/zend_builtin_functions.c: + MFH: Fixded #29291: get_class_vars() return names with NULLs + +* ZendEngine2/zend_builtin_functions.c: + - Fixded #29291: get_class_vars() return names with NULLs + +2004-07-21 Stefan Esser [EMAIL PROTECTED] + +* (PHP_4_3) + ext/mssql/php_mssql.c + ext/session/session.c + ext/sybase/php_sybase_db.c + ext/sybase_ct/php_sybase_ct.c + ext/w32api/w32api.c + main/main.c + main/rfc1867.c + sapi/apache/mod_php4.c: + Merge all not yet merged security fixes into the 4_3 branch + +2004-07-21 Christian Stocker [EMAIL PROTECTED] + +* (PHP_5_0) + run-tests.php: + MFH. Fix for Bug 29010 make test does not wait to email address (by + Sebastian Nohn) + +* run-tests.php: + Fix for Bug 29010 make test does not wait to email address (by Sebastian + Nohn) + +2004-07-21 Sara Golemon [EMAIL PROTECTED] + +* NEWS: + MDTM added to ftp_url_stat + +* ext/standard/ftp_fopen_wrapper.c: + Add MTDM support to ftp_fopen_wrapper::url_stat() + +* ext/zlib/zlib_filter.c: + Oops, copy/paste typo + +* ext/bz2/bz2_filter.c + ext/zlib/zlib_filter.c: + Persistent mallocs can return NULL (on failure) + +2004-07-21 Ilia Alshanetsky [EMAIL PROTECTED] + +* ext/standard/sunfuncs.c: + Abort earlier on invalid format. + 2004-07-20 Moriyoshi Koizumi [EMAIL PROTECTED] * ZendEngine2/zend_alloc.c @@ -6728,7 +6825,7 @@ 2004-03-18 Pierre-Alain Joye [EMAIL PROTECTED] * ext/gd/tests/bug27582_2.phpt: - - Fix the test description and $Id: ChangeLog,v 1.1692 2004/07/21 00:34:22 changelog Exp $ + - Fix the test description and $Id: ChangeLog,v 1.1693 2004/07/22 00:34:29 changelog Exp $ 2004-03-18 Derick Rethans [EMAIL PROTECTED]
[PHP-CVS-DAILY] cvs: ZendEngine2 / ChangeLog
changelog Wed Jul 21 20:34:34 2004 EDT Modified files: /ZendEngine2ChangeLog Log: ChangeLog update http://cvs.php.net/diff.php/ZendEngine2/ChangeLog?r1=1.505r2=1.506ty=u Index: ZendEngine2/ChangeLog diff -u ZendEngine2/ChangeLog:1.505 ZendEngine2/ChangeLog:1.506 --- ZendEngine2/ChangeLog:1.505 Tue Jul 20 20:34:28 2004 +++ ZendEngine2/ChangeLog Wed Jul 21 20:34:33 2004 @@ -1,3 +1,17 @@ +2004-07-21 Edin Kadribasic [EMAIL PROTECTED] + +* zend_builtin_functions.c: + Fixed build + +2004-07-21 Marcus Boerger [EMAIL PROTECTED] + +* (PHP_5_0) + zend_builtin_functions.c: + MFH: Fixded #29291: get_class_vars() return names with NULLs + +* zend_builtin_functions.c: + - Fixded #29291: get_class_vars() return names with NULLs + 2004-07-20 Moriyoshi Koizumi [EMAIL PROTECTED] * zend_alloc.c @@ -5055,7 +5069,7 @@ 2003-06-10 Jani Taskinen [EMAIL PROTECTED] * zend_multiply.h: - - Missing $Id: ChangeLog,v 1.505 2004/07/21 00:34:28 changelog Exp $ tag + - Missing $Id: ChangeLog,v 1.506 2004/07/22 00:34:33 changelog Exp $ tag 2003-06-10 James Cox [EMAIL PROTECTED] @@ -6779,7 +6793,7 @@ zend_types.h zend_variables.c zend_variables.h: - - Added some missing CVS $Id: ChangeLog,v 1.505 2004/07/21 00:34:28 changelog Exp $ tags, headers and footers. + - Added some missing CVS $Id: ChangeLog,v 1.506 2004/07/22 00:34:33 changelog Exp $ tags, headers and footers. 2003-01-30 Ilia Alshanetsky [EMAIL PROTECTED]
[PHP-CVS] cvs: php-src(PHP_4_3) /ext/mssql php_mssql.c /ext/session session.c /ext/sybase php_sybase_db.c /ext/sybase_ct php_sybase_ct.c /ext/w32api w32api.c /main main.c rfc1867.c /sapi/apache mod_php4.c
sesser Wed Jul 21 12:25:28 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/ext/mssql php_mssql.c /php-src/ext/sessionsession.c /php-src/ext/sybase php_sybase_db.c /php-src/ext/sybase_ct php_sybase_ct.c /php-src/ext/w32api w32api.c /php-src/main main.c rfc1867.c /php-src/sapi/apachemod_php4.c Log: Merge all not yet merged security fixes into the 4_3 branch http://cvs.php.net/diff.php/php-src/ext/mssql/php_mssql.c?r1=1.86.2.34r2=1.86.2.35ty=u Index: php-src/ext/mssql/php_mssql.c diff -u php-src/ext/mssql/php_mssql.c:1.86.2.34 php-src/ext/mssql/php_mssql.c:1.86.2.35 --- php-src/ext/mssql/php_mssql.c:1.86.2.34 Wed Jun 30 15:47:18 2004 +++ php-src/ext/mssql/php_mssql.c Wed Jul 21 12:25:27 2004 @@ -16,7 +16,7 @@ +--+ */ -/* $Id: php_mssql.c,v 1.86.2.34 2004/06/30 19:47:18 fmk Exp $ */ +/* $Id: php_mssql.c,v 1.86.2.35 2004/07/21 16:25:27 sesser Exp $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -344,6 +344,7 @@ PHP_RSHUTDOWN_FUNCTION(mssql) { STR_FREE(MS_SQL_G(appname)); + MS_SQL_G(appname) = NULL; if (MS_SQL_G(server_message)) { STR_FREE(MS_SQL_G(server_message)); MS_SQL_G(server_message) = NULL; http://cvs.php.net/diff.php/php-src/ext/session/session.c?r1=1.336.2.40r2=1.336.2.41ty=u Index: php-src/ext/session/session.c diff -u php-src/ext/session/session.c:1.336.2.40 php-src/ext/session/session.c:1.336.2.41 --- php-src/ext/session/session.c:1.336.2.40Wed Jun 23 12:29:16 2004 +++ php-src/ext/session/session.c Wed Jul 21 12:25:27 2004 @@ -17,7 +17,7 @@ +--+ */ -/* $Id: session.c,v 1.336.2.40 2004/06/23 16:29:16 sas Exp $ */ +/* $Id: session.c,v 1.336.2.41 2004/07/21 16:25:27 sesser Exp $ */ #ifdef HAVE_CONFIG_H #include config.h @@ -503,13 +503,16 @@ static void php_session_track_init(TSRMLS_D) { + zval *session_vars = NULL; + /* Unconditionally destroy existing arrays -- possible dirty data */ zend_hash_del(EG(symbol_table), HTTP_SESSION_VARS, sizeof(HTTP_SESSION_VARS)); zend_hash_del(EG(symbol_table), _SESSION, sizeof(_SESSION)); - MAKE_STD_ZVAL(PS(http_session_vars)); - array_init(PS(http_session_vars)); + MAKE_STD_ZVAL(session_vars); + array_init(session_vars); + PS(http_session_vars) = session_vars; ZEND_SET_GLOBAL_VAR_WITH_LENGTH(HTTP_SESSION_VARS, sizeof(HTTP_SESSION_VARS), PS(http_session_vars), 2, 1); ZEND_SET_GLOBAL_VAR_WITH_LENGTH(_SESSION, sizeof(_SESSION), PS(http_session_vars), 2, 1); http://cvs.php.net/diff.php/php-src/ext/sybase/php_sybase_db.c?r1=1.38.2.16r2=1.38.2.17ty=u Index: php-src/ext/sybase/php_sybase_db.c diff -u php-src/ext/sybase/php_sybase_db.c:1.38.2.16 php-src/ext/sybase/php_sybase_db.c:1.38.2.17 --- php-src/ext/sybase/php_sybase_db.c:1.38.2.16Fri Apr 16 12:27:57 2004 +++ php-src/ext/sybase/php_sybase_db.c Wed Jul 21 12:25:27 2004 @@ -20,7 +20,7 @@ +--+ */ -/* $Id: php_sybase_db.c,v 1.38.2.16 2004/04/16 16:27:57 thetaphi Exp $ */ +/* $Id: php_sybase_db.c,v 1.38.2.17 2004/07/21 16:25:27 sesser Exp $ */ #ifdef HAVE_CONFIG_H @@ -297,7 +297,9 @@ PHP_RSHUTDOWN_FUNCTION(sybase) { efree(php_sybase_module.appname); + php_sybase_module.appname = NULL; STR_FREE(php_sybase_module.server_message); + php_sybase_module.server_message = NULL; return SUCCESS; } http://cvs.php.net/diff.php/php-src/ext/sybase_ct/php_sybase_ct.c?r1=1.73.2.17r2=1.73.2.18ty=u Index: php-src/ext/sybase_ct/php_sybase_ct.c diff -u php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.17 php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.18 --- php-src/ext/sybase_ct/php_sybase_ct.c:1.73.2.17 Mon Jul 12 17:07:21 2004 +++ php-src/ext/sybase_ct/php_sybase_ct.c Wed Jul 21 12:25:27 2004 @@ -18,7 +18,7 @@ +--+ */ -/* $Id: php_sybase_ct.c,v 1.73.2.17 2004/07/12 21:07:21 thekid Exp $ */ +/* $Id: php_sybase_ct.c,v 1.73.2.18 2004/07/21 16:25:27 sesser Exp $ */ #ifdef HAVE_CONFIG_H @@ -458,11 +458,13 @@ PHP_RSHUTDOWN_FUNCTION(sybase) { efree(SybCtG(appname)); + SybCtG(appname) = NULL; if (SybCtG(callback_name)) { zval_ptr_dtor(SybCtG(callback_name)); SybCtG(callback_name)= NULL; } STR_FREE(SybCtG(server_message)); + SybCtG(server_message) = NULL; return SUCCESS; } http://cvs.php.net/diff.php/php-src/ext/w32api/w32api.c?r1=1.5.2.3r2=1.5.2.4ty=u Index: php-src/ext/w32api/w32api.c diff -u php-src/ext/w32api/w32api.c:1.5.2.3 php-src/ext/w32api/w32api.c:1.5.2.4 ---
[PHP-CVS] cvs: php-src / NEWS /ext/standard array.c basic_functions.c php_array.h /ext/standard/tests/array array_diff_key.phpt array_intersect_key.phpt
andrey Wed Jul 21 17:17:56 2004 EDT Added files: /php-src/ext/standard/tests/array array_intersect_key.phpt array_diff_key.phpt Modified files: /php-srcNEWS /php-src/ext/standard array.c php_array.h basic_functions.c Log: add array_: intersect_key() intersect_ukey() diff_key() diff_ukey() The first two by a patch of Cristiano Duarte. The second two were implemented in almost the same way except one small difference. http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1769r2=1.1770ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1769 php-src/NEWS:1.1770 --- php-src/NEWS:1.1769 Wed Jul 21 00:38:47 2004 +++ php-src/NEWSWed Jul 21 17:17:56 2004 @@ -5,6 +5,11 @@ - Fixed bug #29236 (memory error when wsdl-cache is enabled). (Dmitry) - Fixed bug #29109 (SoapFault exception: [WSDL] Out of memory). (Dmitry) - Fixed bug #29061 (soap extension segfaults). (Dmitry) +- Added new functions : + . array_diff_key() (Andrey) + . array_diff_ukey() (Andrey) + . array_intersect_key() (Christiano Duarte) + . array_intersect_ukey() (Christiano Duarte) - Added MDTM support to ftp_url_stat. (Sara) - Added zlib stream filter suport. (Sara) - Added bz2 stream filter support. (Sara) http://cvs.php.net/diff.php/php-src/ext/standard/array.c?r1=1.266r2=1.267ty=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.266 php-src/ext/standard/array.c:1.267 --- php-src/ext/standard/array.c:1.266 Sun Jul 11 17:15:04 2004 +++ php-src/ext/standard/array.cWed Jul 21 17:17:56 2004 @@ -21,7 +21,7 @@ +--+ */ -/* $Id: array.c,v 1.266 2004/07/11 21:15:04 andrey Exp $ */ +/* $Id: array.c,v 1.267 2004/07/21 21:17:56 andrey Exp $ */ #include php.h #include php_ini.h @@ -77,6 +77,7 @@ #define DIFF_NORMAL0 #define DIFF_ASSOC 1 +#define DIFF_KEY 2 #define DIFF_COMP_DATA_INTERNAL 0 #define DIFF_COMP_DATA_USER 1 #define DIFF_COMP_KEY_INTERNAL 0 @@ -84,6 +85,7 @@ #define INTERSECT_NORMAL 0 #define INTERSECT_ASSOC1 +#define INTERSECT_KEY 2 #define INTERSECT_COMP_DATA_INTERNAL 0 #define INTERSECT_COMP_DATA_USER 1 #define INTERSECT_COMP_KEY_INTERNAL 0 @@ -2797,12 +2799,17 @@ php_error_docref(NULL TSRMLS_CC, E_WARNING, data_compare_type is %d. This should never happen. Please report as a bug, data_compare_type); return; } - } else if (behavior == INTERSECT_ASSOC) { + } else if ((behavior == INTERSECT_ASSOC) + ||(behavior == INTERSECT_KEY)) { + /* + INTERSECT_KEY is subset of INTERSECT_ASSOC. When having the former + no comparison of the data is done (part of INTERSECT_ASSOC) + */ intersect_key_compare_func = array_key_compare; if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL key_compare_type == INTERSECT_COMP_KEY_INTERNAL) { - /* array_intersect_assoc() */ + /* array_intersect_assoc() or array_intersect_key() */ if (argc 2) { efree(args); @@ -2833,7 +2840,7 @@ } else if (data_compare_type == INTERSECT_COMP_DATA_INTERNAL key_compare_type == INTERSECT_COMP_KEY_USER) { - /* array_intersect_uassoc() */ + /* array_intersect_uassoc() or array_intersect_ukey() */ if (argc 3) { efree(args); @@ -2910,7 +2917,7 @@ *list = NULL; if (behavior == INTERSECT_NORMAL) { zend_qsort((void *) lists[i], hash-nNumOfElements, sizeof(Bucket *), intersect_data_compare_func TSRMLS_CC); - } else if (behavior == INTERSECT_ASSOC) { + } else if ((behavior == INTERSECT_ASSOC) || (behavior == INTERSECT_KEY)) { zend_qsort((void *) lists[i], hash-nNumOfElements, sizeof(Bucket *), intersect_key_compare_func TSRMLS_CC); } } @@ -2926,7 +2933,8 @@ /* go through the lists and look for common values */ while (*ptrs[0]) { - if (behavior == INTERSECT_ASSOC + if ((behavior == INTERSECT_ASSOC + || behavior == INTERSECT_KEY) key_compare_type == INTERSECT_COMP_KEY_USER) { @@ -2938,12 +2946,18 @@ while
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard array.c basic_functions.c php_array.h /ext/standard/tests/array array_diff_key.phpt array_intersect_key.phpt
was there a discussion? On Wed, 21 Jul 2004 21:17:56 -, Andrey Hristov [EMAIL PROTECTED] wrote: andrey Wed Jul 21 17:17:56 2004 EDT Added files: /php-src/ext/standard/tests/array array_intersect_key.phpt array_diff_key.phpt Modified files: /php-srcNEWS /php-src/ext/standard array.c php_array.h basic_functions.c Log: add array_: intersect_key() intersect_ukey() diff_key() diff_ukey() The first two by a patch of Cristiano Duarte. The second two were implemented in almost the same way except one small difference. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-CVS] cvs: php-src / NEWS /ext/standard array.c basic_functions.c php_array.h /ext/standard/tests/array array_diff_key.phpt array_intersect_key.phpt
Kind of, on internals today. Not as long as the ifsetor one though andrey Sterling Hughes wrote: was there a discussion? On Wed, 21 Jul 2004 21:17:56 -, Andrey Hristov [EMAIL PROTECTED] wrote: andrey Wed Jul 21 17:17:56 2004 EDT Added files: /php-src/ext/standard/tests/array array_intersect_key.phpt array_diff_key.phpt Modified files: /php-srcNEWS /php-src/ext/standard array.c php_array.h basic_functions.c Log: add array_: intersect_key() intersect_ukey() diff_key() diff_ukey() The first two by a patch of Cristiano Duarte. The second two were implemented in almost the same way except one small difference. -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/imap php_imap.c
iliaa Wed Jul 21 17:57:03 2004 EDT Modified files: /php-src/ext/imap php_imap.c Log: Fixed bug #29209 (imap_fetchbody() doesn't check message index). # Initial Patch by tony2001 at phpclub dot net http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.184r2=1.185ty=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.184 php-src/ext/imap/php_imap.c:1.185 --- php-src/ext/imap/php_imap.c:1.184 Sun Jul 4 12:52:59 2004 +++ php-src/ext/imap/php_imap.c Wed Jul 21 17:57:03 2004 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.184 2004/07/04 16:52:59 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.185 2004/07/21 21:57:03 iliaa Exp $ */ #define IMAP41 @@ -182,6 +182,12 @@ /* True globals, no need for thread safety */ static int le_imap; +#define PHP_IMAP_CHECK_MSGNO(msgindex) \ + if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); \ + RETURN_FALSE; \ + } \ + /* {{{ mail_close_it */ static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -1529,11 +1535,8 @@ convert_to_string_ex(defaulthost); } - if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) 1 || (unsigned) Z_LVAL_PP(msgno) imap_le_struct-imap_stream-nmsgs) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } - + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + if (mail_fetchstructure(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL)) { cache = mail_elt(imap_le_struct-imap_stream, Z_LVAL_PP(msgno)); } else { @@ -1779,10 +1782,7 @@ } else { msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgindex); mail_fetchstructure_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), body , myargc == 3 ? Z_LVAL_PP(flags) : NIL); @@ -1817,6 +1817,8 @@ convert_to_long_ex(flags); } + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + body = mail_fetchbody_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), len, myargc==4 ? Z_LVAL_PP(flags) : NIL); if (!body) { @@ -2512,10 +2514,7 @@ msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgindex); RETVAL_STRING(mail_fetchheader_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 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_0) /ext/imap php_imap.c
iliaa Wed Jul 21 17:57:09 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/imap php_imap.c Log: MFH: Fixed bug #29209 (imap_fetchbody() doesn't check message index). http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.184r2=1.184.2.1ty=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.184 php-src/ext/imap/php_imap.c:1.184.2.1 --- php-src/ext/imap/php_imap.c:1.184 Sun Jul 4 12:52:59 2004 +++ php-src/ext/imap/php_imap.c Wed Jul 21 17:57:09 2004 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.184 2004/07/04 16:52:59 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.184.2.1 2004/07/21 21:57:09 iliaa Exp $ */ #define IMAP41 @@ -182,6 +182,12 @@ /* True globals, no need for thread safety */ static int le_imap; +#define PHP_IMAP_CHECK_MSGNO(msgindex) \ + if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); \ + RETURN_FALSE; \ + } \ + /* {{{ mail_close_it */ static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -1529,11 +1535,8 @@ convert_to_string_ex(defaulthost); } - if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) 1 || (unsigned) Z_LVAL_PP(msgno) imap_le_struct-imap_stream-nmsgs) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } - + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + if (mail_fetchstructure(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL)) { cache = mail_elt(imap_le_struct-imap_stream, Z_LVAL_PP(msgno)); } else { @@ -1779,10 +1782,7 @@ } else { msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgindex); mail_fetchstructure_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), body , myargc == 3 ? Z_LVAL_PP(flags) : NIL); @@ -1817,6 +1817,8 @@ convert_to_long_ex(flags); } + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + body = mail_fetchbody_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), len, myargc==4 ? Z_LVAL_PP(flags) : NIL); if (!body) { @@ -2512,10 +2514,7 @@ msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgindex); RETVAL_STRING(mail_fetchheader_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) / NEWS /ext/imap php_imap.c
iliaa Wed Jul 21 17:57:13 2004 EDT Modified files: (Branch: PHP_4_3) /php-srcNEWS /php-src/ext/imap php_imap.c Log: MFH: Fixed bug #29209 (imap_fetchbody() doesn't check message index). http://cvs.php.net/diff.php/php-src/NEWS?r1=1.1247.2.705r2=1.1247.2.706ty=u Index: php-src/NEWS diff -u php-src/NEWS:1.1247.2.705 php-src/NEWS:1.1247.2.706 --- php-src/NEWS:1.1247.2.705 Mon Jul 19 21:03:34 2004 +++ php-src/NEWSWed Jul 21 17:57:12 2004 @@ -6,6 +6,8 @@ for doing performance stats without warnings in server-log. (Uwe Schindler) - Fixed bug #29226 (ctype_* functions missing validation of numeric string representations). (Ilia) +- Fixed bug #29209 (imap_fetchbody() doesn't check message index). (Ilia, + tony2001 at phpclub dot net) - Fixed bug #29116 (Zend constant warning uses memory after free). (Marcus, jdolecek at NetBSD dot org) - Fixed bug #29114 (Potential double free in php_stat). (Sara) http://cvs.php.net/diff.php/php-src/ext/imap/php_imap.c?r1=1.142.2.24r2=1.142.2.25ty=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.142.2.24 php-src/ext/imap/php_imap.c:1.142.2.25 --- php-src/ext/imap/php_imap.c:1.142.2.24 Sun Jul 4 12:53:02 2004 +++ php-src/ext/imap/php_imap.c Wed Jul 21 17:57:13 2004 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski [EMAIL PROTECTED] | +--+ */ -/* $Id: php_imap.c,v 1.142.2.24 2004/07/04 16:53:02 iliaa Exp $ */ +/* $Id: php_imap.c,v 1.142.2.25 2004/07/21 21:57:13 iliaa Exp $ */ #define IMAP41 @@ -181,6 +181,12 @@ /* True globals, no need for thread safety */ static int le_imap; +#define PHP_IMAP_CHECK_MSGNO(msgindex) \ + if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, Bad message number); \ + RETURN_FALSE; \ + } \ + /* {{{ mail_close_it */ static void mail_close_it(zend_rsrc_list_entry *rsrc TSRMLS_DC) @@ -1485,10 +1491,7 @@ convert_to_string_ex(defaulthost); } - if (!Z_LVAL_PP(msgno) || Z_LVAL_PP(msgno) 1 || (unsigned) Z_LVAL_PP(msgno) imap_le_struct-imap_stream-nmsgs) { - php_error(E_WARNING, %s(): Bad message number, get_active_function_name(TSRMLS_C)); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); if (mail_fetchstructure(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL)) { cache = mail_elt(imap_le_struct-imap_stream, Z_LVAL_PP(msgno)); @@ -1737,10 +1740,8 @@ } else { msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error(E_WARNING, %s(): Bad message number, get_active_function_name(TSRMLS_C)); - RETURN_FALSE; - } + + PHP_IMAP_CHECK_MSGNO(msgindex); mail_fetchstructure_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), body , myargc == 3 ? Z_LVAL_PP(flags) : NIL); @@ -1775,6 +1776,8 @@ convert_to_long_ex(flags); } + PHP_IMAP_CHECK_MSGNO(Z_LVAL_PP(msgno)); + body = mail_fetchbody_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), Z_STRVAL_PP(sec), len, myargc==4 ? Z_LVAL_PP(flags) : NIL); if (!body) { @@ -2478,10 +2481,7 @@ msgindex = Z_LVAL_PP(msgno); } - if ((msgindex 1) || ((unsigned) msgindex imap_le_struct-imap_stream-nmsgs)) { - php_error(E_WARNING, %s(): Bad message number, get_active_function_name(TSRMLS_C)); - RETURN_FALSE; - } + PHP_IMAP_CHECK_MSGNO(msgindex); RETVAL_STRING(mail_fetchheader_full(imap_le_struct-imap_stream, Z_LVAL_PP(msgno), NIL, NIL, (myargc == 3 ? Z_LVAL_PP(flags) : NIL)), 1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /sapi/isapi php5isapi.c
edink Wed Jul 21 18:52:50 2004 EDT Modified files: /php-src/sapi/isapi php5isapi.c Log: Fix for #28929 by Michael Sisolak http://cvs.php.net/diff.php/php-src/sapi/isapi/php5isapi.c?r1=1.3r2=1.4ty=u Index: php-src/sapi/isapi/php5isapi.c diff -u php-src/sapi/isapi/php5isapi.c:1.3 php-src/sapi/isapi/php5isapi.c:1.4 --- php-src/sapi/isapi/php5isapi.c:1.3 Thu May 13 13:21:39 2004 +++ php-src/sapi/isapi/php5isapi.c Wed Jul 21 18:52:50 2004 @@ -354,7 +354,7 @@ efree(tmp_variable_buf); } } - return ; + return STR_EMPTY_ALLOC(); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /sapi/isapi php5isapi.c
edink Wed Jul 21 18:53:27 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/sapi/isapi php5isapi.c Log: MFH: Fix for #28929 by Michael Sisolak http://cvs.php.net/diff.php/php-src/sapi/isapi/php5isapi.c?r1=1.3r2=1.3.2.1ty=u Index: php-src/sapi/isapi/php5isapi.c diff -u php-src/sapi/isapi/php5isapi.c:1.3 php-src/sapi/isapi/php5isapi.c:1.3.2.1 --- php-src/sapi/isapi/php5isapi.c:1.3 Thu May 13 13:21:39 2004 +++ php-src/sapi/isapi/php5isapi.c Wed Jul 21 18:53:27 2004 @@ -354,7 +354,7 @@ efree(tmp_variable_buf); } } - return ; + return estrndup(, sizeof()-1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / configure.in /main php_version.h
edink Wed Jul 21 19:02:28 2004 EDT Modified files: /php-srcconfigure.in /php-src/main php_version.h Log: HEAD is 5.1.0-dev now http://cvs.php.net/diff.php/php-src/configure.in?r1=1.515r2=1.516ty=u Index: php-src/configure.in diff -u php-src/configure.in:1.515 php-src/configure.in:1.516 --- php-src/configure.in:1.515 Sun Jul 18 08:03:51 2004 +++ php-src/configure.inWed Jul 21 19:02:28 2004 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.515 2004/07/18 12:03:51 wez Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.516 2004/07/21 23:02:28 edink Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -39,8 +39,8 @@ AC_CONFIG_HEADER(main/php_config.h) MAJOR_VERSION=5 -MINOR_VERSION=0 -RELEASE_VERSION=1 +MINOR_VERSION=1 +RELEASE_VERSION=0 EXTRA_VERSION=-dev VERSION=$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION http://cvs.php.net/diff.php/php-src/main/php_version.h?r1=1.97r2=1.98ty=u Index: php-src/main/php_version.h diff -u php-src/main/php_version.h:1.97 php-src/main/php_version.h:1.98 --- php-src/main/php_version.h:1.97 Tue Jul 13 15:56:49 2004 +++ php-src/main/php_version.h Wed Jul 21 19:02:28 2004 @@ -1,7 +1,7 @@ /* automatically generated by configure */ /* edit configure.in to change version number */ #define PHP_MAJOR_VERSION 5 -#define PHP_MINOR_VERSION 0 -#define PHP_RELEASE_VERSION 1 +#define PHP_MINOR_VERSION 1 +#define PHP_RELEASE_VERSION 0 #define PHP_EXTRA_VERSION -dev -#define PHP_VERSION 5.0.1-dev +#define PHP_VERSION 5.1.0-dev -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_4_3) /sapi/isapi php4isapi.c
edink Wed Jul 21 19:26:47 2004 EDT Modified files: (Branch: PHP_4_3) /php-src/sapi/isapi php4isapi.c Log: MFH http://cvs.php.net/diff.php/php-src/sapi/isapi/php4isapi.c?r1=1.92.2.9r2=1.92.2.10ty=u Index: php-src/sapi/isapi/php4isapi.c diff -u php-src/sapi/isapi/php4isapi.c:1.92.2.9 php-src/sapi/isapi/php4isapi.c:1.92.2.10 --- php-src/sapi/isapi/php4isapi.c:1.92.2.9 Thu May 13 13:21:42 2004 +++ php-src/sapi/isapi/php4isapi.c Wed Jul 21 19:26:47 2004 @@ -354,7 +354,7 @@ efree(tmp_variable_buf); } } - return ; + return estrndup(, sizeof()-1); } -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src /ext/mysqli mysqli_api.c
pollita Wed Jul 21 23:23:33 2004 EDT Modified files: /php-src/ext/mysqli mysqli_api.c Log: This should fix binary safety for bound results or may coogle strike me down. http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.89r2=1.90ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.89 php-src/ext/mysqli/mysqli_api.c:1.90 --- php-src/ext/mysqli/mysqli_api.c:1.89Mon Jul 19 03:19:40 2004 +++ php-src/ext/mysqli/mysqli_api.c Wed Jul 21 23:23:33 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.89 2004/07/19 07:19:40 andi Exp $ + $Id: mysqli_api.c,v 1.90 2004/07/22 03:23:33 pollita Exp $ */ #ifdef HAVE_CONFIG_H @@ -629,7 +629,7 @@ ZVAL_LONG(stmt-result.vars[i], llval); } } else { - ZVAL_STRING(stmt-result.vars[i], stmt-result.buf[i].val, 1); + ZVAL_STRINGL(stmt-result.vars[i], stmt-result.buf[i].val, stmt-result.buf[i].buflen, 1); } break; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src(PHP_5_0) /ext/mysqli mysqli_api.c
pollita Wed Jul 21 23:26:59 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/mysqli mysqli_api.c Log: MFH: This should fix binary safety for bound results. http://cvs.php.net/diff.php/php-src/ext/mysqli/mysqli_api.c?r1=1.87r2=1.87.2.1ty=u Index: php-src/ext/mysqli/mysqli_api.c diff -u php-src/ext/mysqli/mysqli_api.c:1.87 php-src/ext/mysqli/mysqli_api.c:1.87.2.1 --- php-src/ext/mysqli/mysqli_api.c:1.87Tue Jul 13 13:04:16 2004 +++ php-src/ext/mysqli/mysqli_api.c Wed Jul 21 23:26:59 2004 @@ -15,7 +15,7 @@ | Author: Georg Richter [EMAIL PROTECTED]| +--+ - $Id: mysqli_api.c,v 1.87 2004/07/13 17:04:16 georg Exp $ + $Id: mysqli_api.c,v 1.87.2.1 2004/07/22 03:26:59 pollita Exp $ */ #ifdef HAVE_CONFIG_H @@ -629,7 +629,7 @@ ZVAL_LONG(stmt-result.vars[i], llval); } } else { - ZVAL_STRING(stmt-result.vars[i], stmt-result.buf[i].val, 1); + ZVAL_STRINGL(stmt-result.vars[i], stmt-result.buf[i].val, stmt-result.buf[i].buflen, 1); } break; default: -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php