Skip to content

Commit

Permalink
Fixed bug #72324 (imap_mailboxmsginfo() return wrong size)
Browse files Browse the repository at this point in the history
  • Loading branch information
KalleZ committed Jul 7, 2017
1 parent 9507d14 commit 5a991ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 2 additions & 5 deletions ext/imap/php_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 5a991ea

Please sign in to comment.