summaryrefslogtreecommitdiff
path: root/ext/bz2/tests/bug72613.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bz2/tests/bug72613.phpt')
-rw-r--r--ext/bz2/tests/bug72613.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/bz2/tests/bug72613.phpt b/ext/bz2/tests/bug72613.phpt
new file mode 100644
index 0000000000..82547e6ae0
--- /dev/null
+++ b/ext/bz2/tests/bug72613.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #72613 (Inadequate error handling in bzread())
+--SKIPIF--
+<?php if (!extension_loaded("bz2")) print "skip"; ?>
+--FILE--
+<?php
+$fp = bzopen(__DIR__.'/72613.bz2', 'r');
+if ($fp === FALSE) {
+ exit("ERROR: bzopen()");
+}
+$data = "";
+while (!feof($fp)) {
+ $res = bzread($fp);
+ if ($res === FALSE) {
+ exit("ERROR: bzread()");
+ }
+ $data .= $res;
+}
+bzclose($fp);
+?>
+DONE
+--EXPECT--
+DONE \ No newline at end of file