com php-src: Fixed bug #72324 (imap_mailboxmsginfo() return wrong size): NEWS ext/imap/php_imap.c

From: Date: Fri, 07 Jul 2017 06:18:33 +0000
Subject: com php-src: Fixed bug #72324 (imap_mailboxmsginfo() return wrong size): NEWS ext/imap/php_imap.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-98442@lists.php.net to get a copy of this message
Commit: 5a991ea49b1accf766e0044e10a3712fe0399a27 Author: Kalle Sommer Nielsen <kalle@php.net> Fri, 7 Jul 2017 08:18:33 +0200 Parents: 9507d145844928db640fb60df4783aaffea04d23 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=5a991ea49b1accf766e0044e10a3712fe0399a27 Log: Fixed bug #72324 (imap_mailboxmsginfo() return wrong size) Bugs: https://bugs.php.net/72324 Changed paths: M NEWS M ext/imap/php_imap.c Diff: diff --git a/NEWS b/NEWS index 2bf9d61..96726fe 100644 --- a/NEWS +++ b/NEWS @@ -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 0f6ac9a..17456e3 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);

« previous php.cvs (#98442) next »