Bug #80213 [Asn->Csd]: imap_mail_compose() segfaults on certain $bodies

From: Date: Sat, 10 Oct 2020 17:21:05 +0000
Subject: Bug #80213 [Asn->Csd]: imap_mail_compose() segfaults on certain $bodies
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-229514@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 Updated by: cmb@php.net Reported by: cmb@php.net Summary: imap_mail_compose() segfaults on certain $bodies -Status: Assigned +Status: Closed 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: Automatic comment on behalf of cmbecker69@gmx.de Revision: http://git.php.net/?p=php-src.git;a=commit;h=8bee0fbd37c8eee0a17abe4a0afd69ad9ac7105a Log: Fix #80213: imap_mail_compose() segfaults on certain $bodies Previous Comments: ------------------------------------------------------------------------ [2020-10-10 14:52:43] cmb@php.net 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 ------------------------------------------------------------------------ [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

« previous php.bugs (#229514) next »