php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80223 imap_mail_compose() leaks envelope on malformed bodies
Submitted: 2020-10-12 11:11 UTC Modified: 2020-10-12 11:11 UTC
From: cmb@php.net Assigned: cmb (profile)
Status: Closed Package: IMAP related
PHP Version: 7.3Git-2020-10-12 (Git) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
47 + 15 = ?
Subscribe to this entry?

 
 [2020-10-12 11:11 UTC] 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.


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-12 11:11 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2020-10-12 11:28 UTC] 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 13:11 UTC] cmb@php.net
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
 [2020-10-12 13:11 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 04:01:28 2024 UTC