#29209 [Com]: imap_fetchbody() doesn't check message index
| From: | crux at syktsu dot ru | Date: | Thu, 12 Aug 2004 18:58:05 +0000 |
| Subject: | #29209 [Com]: imap_fetchbody() doesn't check message index | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-64507@lists.php.net to get a copy of this message | ||
ID: 29209
Comment by: crux at syktsu dot ru
Reported By: tony2001 at phpclub dot net
Status: Closed
Bug Type: IMAP related
Operating System: Irrelevant
PHP Version: 5CVS-2004-07-16 (dev)
New Comment:
> This bug has been fixed in CVS.
This fix has added another bug.
webmail client - "imp" (http://www.horde.org/imp/) become broken (don't
show mail body with error "Bad message number ..." ) after upgrade of
php. On php-4.3.8 all ok.
Previous Comments:
------------------------------------------------------------------------
[2004-07-21 23:57:22] iliaa@php.net
This bug has been fixed in CVS.
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/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2004-07-16 14:13:12] tony2001 at phpclub dot net
Description:
------------
imap_fetchbody() doesn't check message index, causing PHP to segfault
(in fact segfault happens in imap lib).
patches to fix the problem can be found here:
http://tony2004.phpclub.net/dev/tmp/imap_4_3.diff
http://tony2004.phpclub.net/dev/tmp/imap_PHP_5.diff
Reproduce code:
---------------
<?
$mbox = imap_open("{POP3_SERVER:110/pop3}INBOX", "LOGIN", "PASSWD");
$message = imap_fetchbody($mbox, 0, 4);
?>
Expected result:
----------------
-
Actual result:
--------------
segfault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=29209&edit=1