#30568 [Opn->Fbk]: imap_mail_compose segment faults with malformed body

From: Date: Tue, 26 Oct 2004 19:10:12 +0000
Subject: #30568 [Opn->Fbk]: imap_mail_compose segment faults with malformed body
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-68112@lists.php.net to get a copy of this message
ID: 30568 Updated by: derick@php.net Reported By: mike at mikekrejci dot com -Status: Open +Status: Feedback Bug Type: Reproducible crash Operating System: SUSE 9.0 LINUX PHP Version: 5.0.2 New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2004-10-26 21:08:36] mike at mikekrejci dot com 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"] = "tirk@tirkzilla.com"; $envelope["from"]="mike@mikekrejci.com"; $envelope["reply_to"] = "mike@mikekrejci.com"; $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 this bug report at http://bugs.php.net/?id=30568&edit=1

« previous php.bugs (#68112) next »