diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-20 13:36:17 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-10-20 13:36:41 +0200 |
| commit | 486c49dee80440e3aeafc90733c3afe6a19abaed (patch) | |
| tree | c83400c2d191994e339a23fa53b0a150aa4a48d2 /ext/imap/tests | |
| parent | cf0470793844190d1968d55d741a8de8e893ebd5 (diff) | |
| parent | 9cfd650697148e7a87a96f34e268b3f24e3df965 (diff) | |
| download | php-git-486c49dee80440e3aeafc90733c3afe6a19abaed.tar.gz | |
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
Properly fix #80220
Diffstat (limited to 'ext/imap/tests')
| -rw-r--r-- | ext/imap/tests/bug80220.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/imap/tests/bug80220.phpt b/ext/imap/tests/bug80220.phpt new file mode 100644 index 0000000000..0d3e3eda9b --- /dev/null +++ b/ext/imap/tests/bug80220.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #80220 (imap_mail_compose() may leak memory) - message/rfc822 regression +--SKIPIF-- +<?php +if (!extension_loaded('imap')) die('skip imap extension not available'); +?> +--FILE-- +<?php +$bodies = [[ + 'type' => TYPEMESSAGE, + 'subtype' => 'RFC822', +], [ + 'contents.data' => 'asd', +]]; +var_dump(imap_mail_compose([], $bodies)); + +$bodies = [[ + 'type' => TYPEMESSAGE, +], [ + 'contents.data' => 'asd', +]]; +var_dump(imap_mail_compose([], $bodies)); +?> +--EXPECT-- +string(53) "MIME-Version: 1.0 +Content-Type: MESSAGE/RFC822 + + +" +string(53) "MIME-Version: 1.0 +Content-Type: MESSAGE/RFC822 + + +" |
