php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80242 imap_mail_compose() segfaults for multipart with rfc822
Submitted: 2020-10-15 17:03 UTC Modified: 2020-10-15 17:22 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: IMAP related
PHP Version: 7.3Git-2020-10-15 (Git) OS: *
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: cmb@php.net
New email:
PHP Version: OS:

 

 [2020-10-15 17:03 UTC] 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


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-15 17:22 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-10-16 12:12 UTC] 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-20 17:03 UTC] cmb@php.net
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
 [2020-10-20 17:03 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 20:01:28 2024 UTC