From:             mike at mikekrejci dot com
Operating system: SUSE 9.0 LINUX
PHP version:      5.0.2
PHP Bug Type:     Reproducible crash
Bug description:  imap_mail_compose segment faults with malformed body

Description:
------------
If you make an error in your $body array for the imap_mail_compose rather
then giving an error it creates a segmentation fault.  The error in the
code I have sent is that I have nested MULTIPARTs without the
corresponding sections.



Reproduce code:
---------------
<?php
  $envelope["to"] = "[EMAIL PROTECTED]";
  $envelope["from"]="[EMAIL PROTECTED]";
  $envelope["reply_to"] = "[EMAIL PROTECTED]";
  $envelope["subject"] = "Reproducible error";
  $envelope["date"]= date('r');
  $part["type"] = TYPEMULTIPART;
  $part["subtype"] = "mixed";
  $body[1] = $part;
  $part["type"] = TYPEMULTIPART;
  $part["subtype"] = "mixed";
  $body[2] = $part;
  $part["type"] = TYPETEXT;
  $part["subtype"] = "plain";
  $part["contents.data"] = "Message Text.\n";
  $body[3] = $part;
  $MIME = imap_mail_compose ($envelope, $body);
?>


Expected result:
----------------
the following will be entered in your log file:
[Tue Oct 26 12:01:38 2004] [notice] child pid 3282 exit signal
Segmentation fault (11)


Actual result:
--------------
I do not have a backtrace available.

-- 
Edit bug report at http://bugs.php.net/?id=30568&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30568&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30568&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30568&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30568&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30568&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30568&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30568&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30568&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30568&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30568&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30568&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30568&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30568&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30568&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30568&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30568&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30568&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30568&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30568&r=mysqlcfg

Reply via email to