diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-12 13:32:28 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-12 13:32:40 +0200 |
commit | acce991a37e3ab0f86c1aed3e2008d130d99c0d1 (patch) | |
tree | 76ab8734a21a7b5788d98c2394e99e1243afee7e | |
parent | 41e4a77077480aa8cffa8fcc811b0056ac6bf43b (diff) | |
parent | 0d022ddf03c5fabaaa22e486d1e4a367ed9170a7 (diff) | |
download | php-git-acce991a37e3ab0f86c1aed3e2008d130d99c0d1.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80220: imap_mail_compose() may leak memory
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | ext/imap/php_imap.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -16,6 +16,7 @@ PHP NEWS - IMAP: . Fixed bug #80213 (imap_mail_compose() segfaults on certain $bodies). (cmb) . Fixed bug #80215 (imap_mail_compose() may modify by-val parameters). (cmb) + . Fixed bug #80220 (imap_mail_compose() may leak memory). (cmb) - MySQLnd: . Fixed bug #80115 (mysqlnd.debug doesn't recognize absolute paths with diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 5c193c04f4..4afc4229dd 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -3726,7 +3726,7 @@ PHP_FUNCTION(imap_mail_compose) convert_to_string_ex(pvalue); bod->md5 = cpystr(Z_STRVAL_P(pvalue)); } - } else if (Z_TYPE_P(data) == IS_ARRAY) { + } else if (Z_TYPE_P(data) == IS_ARRAY && topbod->type == TYPEMULTIPART) { short type = -1; SEPARATE_ARRAY(data); if ((pvalue = zend_hash_str_find(Z_ARRVAL_P(data), "type", sizeof("type") - 1)) != NULL) { |