Bug #80242 [PATCH]: imap_mail_compose() segfaults for multipart with rfc822
Edit report at https://bugs.php.net/bug.php?id=80242&edit=1
ID: 80242
Patch added by: cmb@php.net
Reported by: cmb@php.net
Summary: imap_mail_compose() segfaults for multipart with
rfc822
Status: Assigned
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:
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
Previous Comments:
------------------------------------------------------------------------
[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
Thread (3 messages)