From f86df41ff4a1ea6614fb02566803c614da9febbc Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Thu, 8 Dec 2005 07:49:47 +0000 Subject: [PATCH] new test for truncated manifest --- ext/phar/tests/008.phpt | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 ext/phar/tests/008.phpt diff --git a/ext/phar/tests/008.phpt b/ext/phar/tests/008.phpt new file mode 100644 index 0000000000..d101ba3cd1 --- /dev/null +++ b/ext/phar/tests/008.phpt @@ -0,0 +1,19 @@ +--TEST-- +PHP_Archive::mapPhar improper parameters +--SKIPIF-- + +--FILE-- +"; +$file .= pack('V', 500) . 'notenough'; +file_put_contents(dirname(__FILE__) . '/008_phar.php', $file); +include dirname(__FILE__) . '/008_phar.php'; +exit; +PHP_Archive::mapPhar(5, 'hio', false); +__HALT_COMPILER(); ?> +--EXPECTF-- +Fatal error: PHP_Archive::mapPhar(): internal corruption of phar "%s" (truncated manifest) in %s on line %d \ No newline at end of file -- 2.50.1