xref: /PHP-8.3/ext/zip/tests/bug81490.phpt (revision 218a93b8)
1--TEST--
2Bug #81490 (ZipArchive::extractTo() may leak memory)
3--EXTENSIONS--
4zip
5--FILE--
6<?php
7$zip = new ZipArchive();
8$zip->open(__DIR__ . "/bug81490.zip", ZipArchive::CREATE|ZipArchive::OVERWRITE);
9$zip->addFromString("", "yada yada");
10mkdir(__DIR__ . "/bug81490");
11$zip->open(__DIR__ . "/bug81490.zip");
12$zip->extractTo(__DIR__ . "/bug81490", "");
13?>
14--EXPECT--
15--CLEAN--
16<?php
17@unlink(__DIR__ . "/bug81490.zip");
18@rmdir(__DIR__ . "/bug81490");
19?>
20