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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: cmb@php.net
New email:
PHP Version: OS:

 

 [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

Pull Requests

Pull requests:

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: Thu Nov 21 15:01:30 2024 UTC