summaryrefslogtreecommitdiff
path: root/ext/zip/tests
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-07-24 23:58:22 +0800
committerXinchen Hui <laruence@gmail.com>2016-07-24 23:58:22 +0800
commitad96a052d918c7fcfaab702c4319acac20435d6b (patch)
treef1724382d7f1c5ccd552984c3b2b23bdb327f520 /ext/zip/tests
parentda3995852edf1a5b7b4c8bda7a1e804cb263dc5e (diff)
downloadphp-git-ad96a052d918c7fcfaab702c4319acac20435d6b.tar.gz
Fixed bug #72660 (NULL Pointer dereference in zend_virtual_cwd)
Diffstat (limited to 'ext/zip/tests')
-rw-r--r--ext/zip/tests/bug72660.phpt20
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/zip/tests/bug72660.phpt b/ext/zip/tests/bug72660.phpt
new file mode 100644
index 0000000000..af02b9b5a3
--- /dev/null
+++ b/ext/zip/tests/bug72660.phpt
@@ -0,0 +1,20 @@
+--TEST--
+Bug #72660 (NULL Pointer dereference in zend_virtual_cwd)
+--SKIPIF--
+<?php
+if(!extension_loaded('zip')) die('skip');
+if(PHP_ZTS == 0) { die('skip ZTS required'); }
+?>
+--FILE--
+<?php
+$zip = new ZipArchive();
+$zip->open(dirname(__FILE__) . "/bug72660.zip", ZIPARCHIVE::CREATE);
+$zip->addPattern("/noexists/");
+?>
+okey
+--CLEAN--
+<?php
+@unlink(dirname(__FILE__) . "/bug72660.zip");
+?>
+--EXPECT--
+okey