diff options
Diffstat (limited to 'ext/imap/tests/bug80220.phpt')
-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 + + +" |