--TEST-- Phar::mapPhar buffer overrun --SKIPIF-- --FILE-- "; // this fails because the manifest length does not include the other 10 byte manifest data $manifest = pack('V', 1) . 'a' . pack('VVVVC', 0, time(), 0, crc32(''), 0); $file .= pack('VVnV', strlen($manifest), 1, 0x0800, 3) . 'hio' . $manifest; file_put_contents(dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php', $file); include dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php'; echo file_get_contents('phar://hio/a'); ?> --CLEAN-- --EXPECTF-- %satal error: Phar::mapPhar(): internal corruption of phar "%s" (too many manifest entries for size of manifest) in %s on line %d