Bug #80223 [Asn->Csd]: imap_mail_compose() leaks envelope on malformed bodies
| From: | cmb@php.net | Date: | Mon, 12 Oct 2020 13:11:35 +0000 |
| Subject: | Bug #80223 [Asn->Csd]: imap_mail_compose() leaks envelope on malformed bodies | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-229574@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80223&edit=1
ID: 80223
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: imap_mail_compose() leaks envelope on malformed
bodies
-Status: Assigned
+Status: Closed
Type: Bug
Package: IMAP related
Operating System: *
PHP Version: 7.3Git-2020-10-12 (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=c1962e900a4ebe74a6e7578e3da75a0931687546
Log: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
Previous Comments:
------------------------------------------------------------------------
[2020-10-12 11:28:38] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #80223: imap_mail_compose() leaks envelope on malformed bodies
On GitHub: https://github.com/php/php-src/pull/6322
Patch: https://github.com/php/php-src/pull/6322.patch
------------------------------------------------------------------------
[2020-10-12 11:11:45] cmb@php.net
Description:
------------
If any body passed to imap_mail_compose() is an empty array or not
an array at all, the function leaks the already allocated
envelope.
Test script:
---------------
<?php
imap_mail_compose([], []);
imap_mail_compose([], [1]);
?>
Expected result:
----------------
no memory leaks
Actual result:
--------------
Detected memory leaks!
Dumping objects ->
{45190} normal block at 0x0000024F8D53F120, 136 bytes long.
Data: < > 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Object dump complete.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80223&edit=1