Bug #80242 [NEW]: imap_mail_compose() segfaults for multipart with rfc822
| From: | cmb@php.net | Date: | Thu, 15 Oct 2020 17:03:15 +0000 |
| Subject: | Bug #80242 [NEW]: imap_mail_compose() segfaults for multipart with rfc822 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-229650@lists.php.net to get a copy of this message | ||
From: cmb
Operating system: *
PHP version: 7.3Git-2020-10-15 (Git)
Package: IMAP related
Bug Type: Bug
Bug description:imap_mail_compose() segfaults for multipart with rfc822
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 bug report at https://bugs.php.net/bug.php?id=80242&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80242&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80242&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80242&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80242&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80242&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80242&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80242&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80242&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80242&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80242&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80242&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80242&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80242&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80242&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80242&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80242&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80242&r=mysqlcfg