diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/imap/php_imap.c | 7 |
2 files changed, 6 insertions, 5 deletions
@@ -13,6 +13,10 @@ PHP NEWS - GD: . Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb) +- IMAP: + . Fixed bug #72324 (imap_mailboxmsginfo() return wrong size). + (ronaldpoon at udomain dot com dot hk, Kalle) + - OpenSSL: . Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()). (Stas) diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 0f6ac9a2d0..17456e3df7 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2601,7 +2601,8 @@ PHP_FUNCTION(imap_mailboxmsginfo) zval *streamind; pils *imap_le_struct; char date[100]; - unsigned int msgno, unreadmsg, deletedmsg, msize; + unsigned long msgno; + zend_ulong unreadmsg = 0, deletedmsg = 0, msize = 0; if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) { return; @@ -2614,10 +2615,6 @@ PHP_FUNCTION(imap_mailboxmsginfo) /* Initialize return object */ object_init(return_value); - unreadmsg = 0; - deletedmsg = 0; - msize = 0; - for (msgno = 1; msgno <= imap_le_struct->imap_stream->nmsgs; msgno++) { MESSAGECACHE * cache = mail_elt (imap_le_struct->imap_stream, msgno); mail_fetchstructure (imap_le_struct->imap_stream, msgno, NIL); |