Bug #80213 [PATCH]: imap_mail_compose() segfaults on certain $bodies
| From: | cmb@php.net | Date: | Sat, 10 Oct 2020 14:52:43 +0000 |
| Subject: | Bug #80213 [PATCH]: imap_mail_compose() segfaults on certain $bodies | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229510@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80213&edit=1
ID: 80213
Patch added by: cmb@php.net
Reported by: cmb@php.net
Summary: imap_mail_compose() segfaults on certain $bodies
Status: Assigned
Type: Bug
Package: IMAP related
Operating System: *
PHP Version: 7.3Git-2020-10-10 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
The following pull request has been associated:
Patch Name: Fix #80213: imap_mail_compose() segfaults on certain $bodies
On GitHub: https://github.com/php/php-src/pull/6315
Patch: https://github.com/php/php-src/pull/6315.patch
Previous Comments:
------------------------------------------------------------------------
[2020-10-10 11:59:08] cmb@php.net
Description:
------------
The 'type.parameters' and 'disposition' elements of a body are
supposed to hold associative arrays. Passing non associative
arrays leads to a segfault.
Test script:
---------------
<?php
$envelope = [];
$body = [[
'type.parameters' => ['param'],
'disposition' => ['disp'],
], [
'type.parameters' => ['param'],
'disposition' => ['disp'],
]];
imap_mail_compose($envelope, $body);
echo "done\n";
?>
Expected result:
----------------
done
Actual result:
--------------
segfault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80213&edit=1