Skip to content

Commit 5a991ea

Browse files
committed
Fixed bug #72324 (imap_mailboxmsginfo() return wrong size)
1 parent 9507d14 commit 5a991ea

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ PHP NEWS
1313
- GD:
1414
. Fixed bug #74435 (Buffer over-read into uninitialized memory). (cmb)
1515

16+
- IMAP:
17+
. Fixed bug #72324 (imap_mailboxmsginfo() return wrong size).
18+
(ronaldpoon at udomain dot com dot hk, Kalle)
19+
1620
- OpenSSL:
1721
. Fixed bug #74651 (negative-size-param (-1) in memcpy in zif_openssl_seal()).
1822
(Stas)

ext/imap/php_imap.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2601,7 +2601,8 @@ PHP_FUNCTION(imap_mailboxmsginfo)
26012601
zval *streamind;
26022602
pils *imap_le_struct;
26032603
char date[100];
2604-
unsigned int msgno, unreadmsg, deletedmsg, msize;
2604+
unsigned long msgno;
2605+
zend_ulong unreadmsg = 0, deletedmsg = 0, msize = 0;
26052606

26062607
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
26072608
return;
@@ -2614,10 +2615,6 @@ PHP_FUNCTION(imap_mailboxmsginfo)
26142615
/* Initialize return object */
26152616
object_init(return_value);
26162617

2617-
unreadmsg = 0;
2618-
deletedmsg = 0;
2619-
msize = 0;
2620-
26212618
for (msgno = 1; msgno <= imap_le_struct->imap_stream->nmsgs; msgno++) {
26222619
MESSAGECACHE * cache = mail_elt (imap_le_struct->imap_stream, msgno);
26232620
mail_fetchstructure (imap_le_struct->imap_stream, msgno, NIL);

0 commit comments

Comments
 (0)