From: Greg Beaver Date: Thu, 8 Dec 2005 07:49:47 +0000 (+0000) Subject: new test for truncated manifest X-Git-Tag: RELEASE_1_0_4~469 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f86df41ff4a1ea6614fb02566803c614da9febbc;p=php new test for truncated manifest --- 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