zoe Tue Dec 16 21:35:42 2008 UTC Modified files: (Branch: PHP_5_2) /php-src/ext/imap php_imap.c Log: bug #46837 fix http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.208.2.7.2.39&r2=1.208.2.7.2.40&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.39 php-src/ext/imap/php_imap.c:1.208.2.7.2.40 --- php-src/ext/imap/php_imap.c:1.208.2.7.2.39 Tue Dec 16 21:11:49 2008 +++ php-src/ext/imap/php_imap.c Tue Dec 16 21:35:42 2008 @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <z...@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c,v 1.208.2.7.2.39 2008/12/16 21:11:49 zoe Exp $ */ +/* $Id: php_imap.c,v 1.208.2.7.2.40 2008/12/16 21:35:42 zoe Exp $ */ #define IMAP41 @@ -1140,6 +1140,13 @@ if (myargcount == 2) { convert_to_long_ex(options); flags = Z_LVAL_PP(options); + + /* Check that flags is exactly equal to PHP_EXPUNGE or Zero*/ + if (flags && ((flags & ~PHP_EXPUNGE) != 0)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid value for the flags parameter"); + RETURN_FALSE; + } + /* Do the translation from PHP's internal PHP_EXPUNGE define to c-client's CL_EXPUNGE */ if (flags & PHP_EXPUNGE) { flags ^= PHP_EXPUNGE;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php