iliaa Wed Apr 2 16:31:51 2008 UTC Modified files: (Branch: PHP_5_2) /php-src NEWS /php-src/ext/imap php_imap.c Log: MFB: imap bug fixes http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1127&r2=1.2027.2.547.2.1128&diff_format=u Index: php-src/NEWS diff -u php-src/NEWS:1.2027.2.547.2.1127 php-src/NEWS:1.2027.2.547.2.1128 --- php-src/NEWS:1.2027.2.547.2.1127 Fri Mar 28 16:43:49 2008 +++ php-src/NEWS Wed Apr 2 16:31:50 2008 @@ -1,6 +1,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? Apr 2008, PHP 5.2.6 +- Fixed bug #44613 (Crash inside imap_headerinfo()). (Ilia, jmessa) +- Fixed bug #44594 (imap_open() does not validate # of retries parameter). + (Ilia) - Fixed bug #44557 (Crash in imap_setacl when supplied integer as username) (Thomas Jarosch) http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.28&r2=1.208.2.7.2.29&diff_format=u Index: php-src/ext/imap/php_imap.c diff -u php-src/ext/imap/php_imap.c:1.208.2.7.2.28 php-src/ext/imap/php_imap.c:1.208.2.7.2.29 --- php-src/ext/imap/php_imap.c:1.208.2.7.2.28 Fri Mar 28 16:43:49 2008 +++ php-src/ext/imap/php_imap.c Wed Apr 2 16:31:51 2008 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.208.2.7.2.28 2008/03/28 16:43:49 felipe Exp $ */ +/* $Id: php_imap.c,v 1.208.2.7.2.29 2008/04/02 16:31:51 iliaa Exp $ */ #define IMAP41 @@ -792,7 +792,11 @@ #ifdef SET_MAXLOGINTRIALS if (myargc == 5) { convert_to_long_ex(retries); - mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) Z_LVAL_PP(retries)); + if (retries < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING ,"Retries must be greater or equal to 0"); + } else { + mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) Z_LVAL_PP(retries)); + } } #endif @@ -1583,8 +1587,8 @@ convert_to_long_ex(msgno); if (myargc >= 3) { convert_to_long_ex(fromlength); - if (Z_LVAL_PP(fromlength) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be greater than or equal to 0"); + if (Z_LVAL_PP(fromlength) < 0 || Z_LVAL_PP(fromlength) >= MAILTMPLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "From length has to be between 1 and %i", MAILTMPLEN); RETURN_FALSE; } } else { @@ -1592,8 +1596,8 @@ } if (myargc >= 4) { convert_to_long_ex(subjectlength); - if (Z_LVAL_PP(subjectlength) < 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be greater than or equal to 0"); + if (Z_LVAL_PP(subjectlength) < 0 || Z_LVAL_PP(subjectlength) >= MAILTMPLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Subject length has to be between 1 and %i", MAILTMPLEN); RETURN_FALSE; } } else {
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php