Bug #80242 [Asn->Csd]: imap_mail_compose() segfaults for multipart with rfc822

From: Date: Tue, 20 Oct 2020 17:03:22 +0000
Subject: Bug #80242 [Asn->Csd]: imap_mail_compose() segfaults for multipart with rfc822
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229813@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=80242&edit=1 ID: 80242 Updated by: cmb@php.net Reported by: cmb@php.net Summary: imap_mail_compose() segfaults for multipart with rfc822 -Status: Assigned +Status: Closed Type: Bug Package: IMAP related Operating System: * PHP Version: 7.3Git-2020-10-15 (Git) Assigned To: cmb Block user comment: N Private report: N New Comment: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=315b95b0654fca116d6db0f11dc22151ac139988 Log: Fix #80242: imap_mail_compose() segfaults for multipart with rfc822 Previous Comments: ------------------------------------------------------------------------ [2020-10-16 12:12:05] cmb@php.net The following pull request has been associated: Patch Name: Fix #80242: imap_mail_compose() segfaults for multipart with rfc822 On GitHub: https://github.com/php/php-src/pull/6345 Patch: https://github.com/php/php-src/pull/6345.patch ------------------------------------------------------------------------ [2020-10-15 17:03:15] cmb@php.net Description: ------------ When imap_mail_compose() is used to compose a multipart message with one or more message/rfc822 parts where the subtype is explicitly specified, the function segfaults. Note that composing a multipart message with one or more message/rfc822 where the subtype is not explicitly specified does not segfault, due to the way this is handled by lib-client (2007). Test script: --------------- <?php $bodies = [[ 'type' => TYPEMULTIPART, ], [ 'type' => TYPETEXT, 'contents.data' => 'some text', ], [ 'type' => TYPEMESSAGE, 'subtype' => 'RFC822', ]]; imap_mail_compose([], $bodies); echo "done\n"; ?> Expected result: ---------------- done Actual result: -------------- segfault ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80242&edit=1

« previous php.bugs (#229813) next »