File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ PHP NEWS
13
13
. Fixed bug #80213 (imap_mail_compose() segfaults on certain $bodies). (cmb)
14
14
. Fixed bug #80215 (imap_mail_compose() may modify by-val parameters). (cmb)
15
15
. Fixed bug #80220 (imap_mail_compose() may leak memory). (cmb)
16
+ . Fixed bug #80223 (imap_mail_compose() leaks envelope on malformed bodies).
17
+ (cmb)
16
18
17
19
- MySQLnd:
18
20
. Fixed bug #80115 (mysqlnd.debug doesn't recognize absolute paths with
Original file line number Diff line number Diff line change @@ -3622,7 +3622,8 @@ PHP_FUNCTION(imap_mail_compose)
3622
3622
3623
3623
if (Z_TYPE_P (data ) != IS_ARRAY ) {
3624
3624
php_error_docref (NULL , E_WARNING , "body parameter must be a non-empty array" );
3625
- RETURN_FALSE ;
3625
+ RETVAL_FALSE ;
3626
+ goto done ;
3626
3627
}
3627
3628
SEPARATE_ARRAY (data );
3628
3629
@@ -3824,7 +3825,8 @@ PHP_FUNCTION(imap_mail_compose)
3824
3825
3825
3826
if (first ) {
3826
3827
php_error_docref (NULL , E_WARNING , "body parameter must be a non-empty array" );
3827
- RETURN_FALSE ;
3828
+ RETVAL_FALSE ;
3829
+ goto done ;
3828
3830
}
3829
3831
3830
3832
if (bod && bod -> type == TYPEMULTIPART && (!bod -> nested .part || !bod -> nested .part -> next )) {
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Bug #80223 (imap_mail_compose() leaks envelope on malformed bodies)
3
+ --SKIPIF--
4
+ <?php
5
+ if (!extension_loaded ('imap ' )) die ('skip imap extension not available ' );
6
+ ?>
7
+ --FILE--
8
+ <?php
9
+ imap_mail_compose ([], []);
10
+ imap_mail_compose ([], [1 ]);
11
+ ?>
12
+ --EXPECTF--
13
+ Warning: imap_mail_compose(): body parameter must be a non-empty array in %s on line %d
14
+
15
+ Warning: imap_mail_compose(): body parameter must be a non-empty array in %s on line %d
You can’t perform that action at this time.
0 commit comments