diff options
Diffstat (limited to 'ext/zip/tests/bug53885.phpt')
| -rw-r--r-- | ext/zip/tests/bug53885.phpt | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/ext/zip/tests/bug53885.phpt b/ext/zip/tests/bug53885.phpt new file mode 100644 index 0000000..1b3fcb9 --- /dev/null +++ b/ext/zip/tests/bug53885.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #53885 (ZipArchive segfault with FL_UNCHANGED on empty archive) +--SKIPIF-- +<?php +if(!extension_loaded('zip')) die('skip'); +?> +--FILE-- +<?php +$fname = dirname(__FILE__)."/test53885.zip"; +if(file_exists($fname)) unlink($fname); +touch($fname); +$nx=new ZipArchive(); +$nx->open($fname); +$nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED); +$nx->statName("a",ZIPARCHIVE::FL_UNCHANGED); +?> +==DONE== +--CLEAN-- +<?php +$fname = dirname(__FILE__)."/test53885.zip"; +unlink($fname); +?> +--EXPECTF-- +==DONE== |
