Bug #72324 [Asn->Csd]: imap_mailboxmsginfo() return wrong size
| From: | kalle@php.net | Date: | Fri, 07 Jul 2017 06:19:03 +0000 |
| Subject: | Bug #72324 [Asn->Csd]: imap_mailboxmsginfo() return wrong size | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-209878@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72324&edit=1
ID: 72324
Updated by: kalle@php.net
Reported by: ronaldpoon at udomain dot com dot hk
Summary: imap_mailboxmsginfo() return wrong size
-Status: Assigned
+Status: Closed
Type: Bug
Package: IMAP related
Operating System: Any
PHP Version: Irrelevant
Assigned To: kalle
Block user comment: N
Private report: N
New Comment:
The fix for this bug has been committed.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
For Windows:
http://windows.php.net/snapshots/
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2016-06-03 08:50:27] ronaldpoon at udomain dot com dot hk
Description:
------------
When mailbox or subfolder larger than 4G, the imap_mailboxmsginfo() will return wrong size. It is
because the msize for accumulate the RFC822.SIZE overflow beyond 4G due to 32bit integer. By
changing the unsigned int to unsigned long, the msize will be calculated correctly.
--- ext/imap/php_imap.c.orig 2016-06-03 16:39:44.387619879 +0800
+++ ext/imap/php_imap.c 2016-06-03 16:40:10.484287296 +0800
@@ -2601,7 +2601,7 @@ PHP_FUNCTION(imap_mailboxmsginfo)
zval *streamind;
pils *imap_le_struct;
char date[100];
- unsigned int msgno, unreadmsg, deletedmsg, msize;
+ unsigned long msgno, unreadmsg, deletedmsg, msize;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &streamind) == FAILURE) {
return;
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72324&edit=1