1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 07:58:20 +02:00

Merge branch 'PHP-8.0' into master

* PHP-8.0:
  Fix #80226: imap_sort() leaks sortpgm memory
This commit is contained in:
Christoph M. Becker
2020-10-12 23:22:19 +02:00
2 changed files with 14 additions and 0 deletions
+1
View File
@@ -2742,6 +2742,7 @@ PHP_FUNCTION(imap_sort)
slst = mail_sort(imap_le_struct->imap_stream, (charset ? ZSTR_VAL(charset) : NIL), spg, mypgm, flags);
mail_free_sortpgm(&mypgm);
if (spg && !(flags & SE_FREE)) {
mail_free_searchpgm(&spg);
}
+13
View File
@@ -0,0 +1,13 @@
--TEST--
Bug #80226 (imap_sort() leaks sortpgm memory)
--SKIPIF--
<?php
require_once(__DIR__.'/skipif.inc');
?>
--FILE--
<?php
require_once(__DIR__.'/imap_include.inc');
$stream = imap_open($default_mailbox, $username, $password);
imap_sort($stream, SORTFROM, 0);
?>
--EXPECT--