1--TEST-- 2Phar: PHP bug #72321: invalid free in phar_extract_file() 3--SKIPIF-- 4<?php if (!extension_loaded("phar")) die("skip"); ?> 5--FILE-- 6<?php 7chdir(__DIR__); 8mkdir("test72321"); 9$phar = new PharData("72321_1.zip"); 10$phar->extractTo("test72321"); 11$phar = new PharData("72321_2.zip"); 12try { 13$phar->extractTo("test72321"); 14} catch(PharException $e) { 15 print $e->getMessage()."\n"; 16} 17?> 18DONE 19--CLEAN-- 20<?php unlink(__DIR__."/test72321/AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); 21rmdir(__DIR__."/test72321"); 22?> 23--EXPECTF-- 24Warning: PharData::extractTo(): %s in %sbug72321.php on line %d 25Extraction from phar "%s72321_2.zip" failed: Cannot extract "AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b/c", could not create directory "test72321/AAAAAAAAxxxxBBBBCCCCCCCCxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/b" 26DONE 27