php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29209 imap_fetchbody() doesn't check message index
Submitted: 2004-07-16 14:13 UTC Modified: 2004-07-21 23:57 UTC
From: tony2001 at phpclub dot net Assigned:
Status: Closed Package: IMAP related
PHP Version: 5CVS-2004-07-16 (dev) OS: Irrelevant
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: tony2001 at phpclub dot net
New email:
PHP Version: OS:

 

 [2004-07-16 14:13 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-21 23:57 UTC] 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-08-12 20:58 UTC] crux at syktsu dot ru
> 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.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Thu Jun 20 03:01:25 2019 UTC