Skip to content

Commit acce991

Browse files
committed
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3: Fix #80220: imap_mail_compose() may leak memory
2 parents 41e4a77 + 0d022dd commit acce991

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ PHP NEWS
1616
- IMAP:
1717
. Fixed bug #80213 (imap_mail_compose() segfaults on certain $bodies). (cmb)
1818
. Fixed bug #80215 (imap_mail_compose() may modify by-val parameters). (cmb)
19+
. Fixed bug #80220 (imap_mail_compose() may leak memory). (cmb)
1920

2021
- MySQLnd:
2122
. Fixed bug #80115 (mysqlnd.debug doesn't recognize absolute paths with

ext/imap/php_imap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3726,7 +3726,7 @@ PHP_FUNCTION(imap_mail_compose)
37263726
convert_to_string_ex(pvalue);
37273727
bod->md5 = cpystr(Z_STRVAL_P(pvalue));
37283728
}
3729-
} else if (Z_TYPE_P(data) == IS_ARRAY) {
3729+
} else if (Z_TYPE_P(data) == IS_ARRAY && topbod->type == TYPEMULTIPART) {
37303730
short type = -1;
37313731
SEPARATE_ARRAY(data);
37323732
if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) {

0 commit comments

Comments
 (0)