zoe Tue Dec 16 21:34:16 2008 UTC
Modified files:
/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.266&r2=1.267&diff_format=u
Index: php-src/ext/imap/php_imap.c
diff -u php-src/ext/imap/php_imap.c:1.266 php-src/ext/imap/php_imap.c:1.267
--- php-src/ext/imap/php_imap.c:1.266 Tue Dec 16 21:08:50 2008
+++ php-src/ext/imap/php_imap.c Tue Dec 16 21:34:16 2008
@@ -26,7 +26,7 @@
| PHP 4.0 updates: Zeev Suraski <[email protected]> |
+----------------------------------------------------------------------+
*/
-/* $Id: php_imap.c,v 1.266 2008/12/16 21:08:50 zoe Exp $ */
+/* $Id: php_imap.c,v 1.267 2008/12/16 21:34:16 zoe Exp $ */
#define IMAP41
@@ -1483,6 +1483,13 @@
if (argc == 2) {
flags = 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