#29209 [NEW]: imap_fetchbody() doesn't check message index
| From: | tony2001 at phpclub dot net | Date: | Fri, 16 Jul 2004 12:13:12 +0000 |
| Subject: | #29209 [NEW]: imap_fetchbody() doesn't check message index | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-62478@lists.php.net to get a copy of this message | ||
From: tony2001 at phpclub dot net
Operating system: Irrelevant
PHP version: 5CVS-2004-07-16 (dev)
PHP Bug Type: IMAP related
Bug description: imap_fetchbody() doesn't check message index
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 bug report at http://bugs.php.net/?id=29209&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29209&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29209&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29209&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29209&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29209&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29209&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29209&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29209&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29209&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29209&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29209&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29209&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29209&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29209&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29209&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29209&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29209&r=float