php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #45729 Crash when fetching mails with long to-address field via pop3
Submitted: 2008-08-06 09:37 UTC Modified: 2009-05-09 01:00 UTC
From: kirsch at mediafinanz dot de Assigned: pajoye (profile)
Status: No Feedback Package: IMAP related
PHP Version: 5.2.6 OS: win32 only - Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: kirsch at mediafinanz dot de
New email:
PHP Version: OS:

 

 [2008-08-06 09:37 UTC] kirsch at mediafinanz dot de
Description:
------------
When trying to receive a mail with a really long to-address field (e.g. Spam with 276 receivers) over pop3, PHP crashes. But it seems that it depends of the way I open the connection to the mailbox.

PHP crashes on long to-address mail if I use $mailbox = imap_open('{mail.myserver.net:110/pop3/novalidate-cert}INBOX', 'php@myserver.net', 'mydamnsecretpassword');, but everything works fine if I use $mailbox = imap_open('{mail.myserver.net:143}INBOX', 'php@myserver.net', 'mydamnsecretpassword');

Reproduce code:
---------------
//you'll need a mail with a lot of receivers for this test
$mailbox = imap_open('{mail.myserver.net:110/pop3/novalidate-cert}INBOX', 'php@myserver.net', 'mydamnsecretpassword');

$check = imap_check($mailbox);

for ($i=1; $i <= $check->Nmsgs; $i++)
{
    $uid = imap_uid($mailbox, $i);
    echo 'UID: '.$uid;
    $messageNumber = imap_msgno($mailbox, $uid);
    echo 'MessageNo: '.$messageNumber;
    $headerinfo = imap_headerinfo($mailbox, $messageNumber);
    [...]
}

Expected result:
----------------
$headerinfo contains an stdObject with headerinformation, like it does if it is a 'normal' mail

Actual result:
--------------
Crash with message 'This application has requested the Runtime to terminiate it in an unusual way. Please contact the application's support team for more information'

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-30 20:29 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/

Please try 5.3 too (different c-client version).
 [2009-05-09 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 01:01:28 2024 UTC