Skip to content

Commit b7c1834

Browse files
committed
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix #80239: imap_rfc822_write_address() leaks memory
2 parents 15a3eca + 7899ac4 commit b7c1834

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.0.0RC3
44

5+
- IMAP:
6+
. Fixed bug #80239 (imap_rfc822_write_address() leaks memory). (cmb)
57

68
15 Oct 2020, PHP 8.0.0RC2
79

ext/imap/php_imap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1849,6 +1849,7 @@ PHP_FUNCTION(imap_subscribe)
18491849
} else {
18501850
RETURN_FALSE;
18511851
}
1852+
mail_free_address(&addr);
18521853
}
18531854
/* }}} */
18541855

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--TEST--
2+
imap_rfc822_write_address() : basic functionality
3+
--SKIPIF--
4+
<?php
5+
if (!extension_loaded('imap')) die('skip imap extension not available');
6+
?>
7+
--FILE--
8+
<?php
9+
var_dump(imap_rfc822_write_address('me', 'example.com', 'My Name'));
10+
?>
11+
--EXPECT--
12+
string(24) "My Name <me@example.com>"

0 commit comments

Comments
 (0)