diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2008-04-01 18:28:45 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2008-04-01 18:28:45 +0000 |
commit | 7f9d35ebf79d32d59124eb6155d6d5512cf892e6 (patch) | |
tree | 52c63c3afcae6e91c7eb93a11d504f300653d11b /ext/imap/php_imap.c | |
parent | eade375f564aa8d84e6c3cb9bc125b5a743bca4a (diff) | |
download | php-git-7f9d35ebf79d32d59124eb6155d6d5512cf892e6.tar.gz |
Fixed bug #44594 (imap_open() does not validate # of retries parameter)
Diffstat (limited to 'ext/imap/php_imap.c')
-rw-r--r-- | ext/imap/php_imap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index a7c554083c..b39f859932 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -798,7 +798,11 @@ static void php_imap_do_open(INTERNAL_FUNCTION_PARAMETERS, int persistent) #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 eqaul to 0"); + } else { + mail_parameters(NIL, SET_MAXLOGINTRIALS, (void *) Z_LVAL_PP(retries)); + } } #endif |