From: lokitek at gmail dot com Operating system: CentOS 5.4 PHP version: 5.2.12 PHP Bug Type: Reproducible crash Bug description: imap_headerinfo Address buffer overflow
Description: ------------ While using the imap_headerinfo() function to obtain information about emails that I check via IMAP, I noticed that PHP complained about imap_headerinfo() Address buffer overflow. A bit of investigation revealed that a spam message containing 500+ CC email addresses caused this issue. Reproduce code: --------------- // Send an email with 500+ CCd users. then use imap_headerinfo() to // obtain all header information. // [from doc] $mBox = imap_open("{host:143/imap/novalidate-cert}INBOX}", $username, $password); // open as imap $header = imap_header($mBox, 1); // get first mails header // imap_headerinfo() will crash with the following error: // PHP Fatal error: imap_headerinfo(): Address buffer overflow Expected result: ---------------- I expect to information about the given message number by reading its headers and returned in an object format Actual result: -------------- PHP Fatal error: imap_headerinfo(): Address buffer overflow -- Edit bug report at http://bugs.php.net/?id=50977&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50977&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50977&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50977&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50977&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50977&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50977&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50977&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50977&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50977&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50977&r=support Expected behavior: http://bugs.php.net/fix.php?id=50977&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50977&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50977&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50977&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50977&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50977&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50977&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50977&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50977&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50977&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50977&r=mysqlcfg